猫咪戏法优化
This commit is contained in:
parent
8ff8c7f34a
commit
fefac439c8
@ -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":
|
||||
|
||||
@ -64,4 +64,5 @@ func init() {
|
||||
gob.Register(&limitedTimeEvent.MoneyCat{})
|
||||
gob.Register(&limitedTimeEvent.LuckyCat{})
|
||||
gob.Register(&msg.HandbookMsg{})
|
||||
gob.Register(&limitedTimeEvent.CatTrick{})
|
||||
}
|
||||
|
||||
@ -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 := <EInfo{
|
||||
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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user