猫咪戏法优化

This commit is contained in:
hahwu 2025-04-18 11:23:36 +08:00
parent 8ff8c7f34a
commit fefac439c8
3 changed files with 7 additions and 3 deletions

View File

@ -41,6 +41,9 @@ func ReqGmCommand_(player *Player, Command string) error {
// log.Error("ReqGmCommand panic: %v", err)
// }
// }()
player.TeLog("gm", map[string]interface{}{
"command": Command,
})
arg := strings.Split(Command, " ")
switch arg[0] {
case "additem":

View File

@ -64,4 +64,5 @@ func init() {
gob.Register(&limitedTimeEvent.MoneyCat{})
gob.Register(&limitedTimeEvent.LuckyCat{})
gob.Register(&msg.HandbookMsg{})
gob.Register(&limitedTimeEvent.CatTrick{})
}

View File

@ -155,7 +155,7 @@ func (l *LimitedTimeEventMod) Trigger(Lv int) (int, []int, []int) {
func (l *LimitedTimeEventMod) AddEvent(EventId, Duration int) int64 {
if v, ok := l.EventList[EventId]; ok {
v.Remian += int64(Duration)
addEventInfo(v, EventId)
addEventInfo(v, EventId, Duration)
} else {
Event := &LTEInfo{
Remian: int64(Duration),
@ -455,13 +455,13 @@ func initEventInfo(E *LTEInfo, EventType int) {
}
}
func addEventInfo(E *LTEInfo, EventType int) {
func addEventInfo(E *LTEInfo, EventType, Duration int) {
switch EventType {
case EVENT_TYPE_CAT_TRICK:
d := E.D.(*CatTrick)
d.List = append(d.List, CatTrickInfo{
Id: len(d.List) + 1,
Type: limitedTimeEventCfg.GetCatTrickType(int(E.Remian)),
Type: limitedTimeEventCfg.GetCatTrickType(Duration),
})
case EVENT_TYPE_PAYBACK_DAY:
d := E.D.(*PaybackDay)