优化
This commit is contained in:
parent
51246def30
commit
273d32d658
@ -296,7 +296,7 @@ func ReqGmCommand_(player *Player, Command string) error {
|
|||||||
PlayroomMod := player.PlayMod.getPlayroomMod()
|
PlayroomMod := player.PlayMod.getPlayroomMod()
|
||||||
PlayroomMod.NewCollect = make(map[int]*playroom.CollectInfo, 0)
|
PlayroomMod.NewCollect = make(map[int]*playroom.CollectInfo, 0)
|
||||||
for _, v := range CollectList {
|
for _, v := range CollectList {
|
||||||
PlayroomMod.AddCollect(v)
|
PlayroomMod.AddCollect(v, "Gm")
|
||||||
}
|
}
|
||||||
case "playroomDress":
|
case "playroomDress":
|
||||||
PlayroomMod := player.PlayMod.getPlayroomMod()
|
PlayroomMod := player.PlayMod.getPlayroomMod()
|
||||||
|
|||||||
@ -699,7 +699,7 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
|||||||
case item.ITEM_TYPE_PLAYROOM_DECORATION: // playroom装饰
|
case item.ITEM_TYPE_PLAYROOM_DECORATION: // playroom装饰
|
||||||
Effect := itemCfg.GetItemEffect(v.Id)
|
Effect := itemCfg.GetItemEffect(v.Id)
|
||||||
PlayroomMod := p.PlayMod.getPlayroomMod()
|
PlayroomMod := p.PlayMod.getPlayroomMod()
|
||||||
PlayroomMod.AddCollect(Effect)
|
PlayroomMod.AddCollect(Effect, Label)
|
||||||
BackDataType[item.ITEM_TYPE_PLAYROOM_DECORATION] = struct{}{}
|
BackDataType[item.ITEM_TYPE_PLAYROOM_DECORATION] = struct{}{}
|
||||||
Type, Name := playroomCfg.GetDecoInfo(Effect)
|
Type, Name := playroomCfg.GetDecoInfo(Effect)
|
||||||
p.TeLog("room_deco_get", map[string]interface{}{
|
p.TeLog("room_deco_get", map[string]interface{}{
|
||||||
@ -710,7 +710,7 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
|||||||
case item.ITEM_TYPE_PLAYROOM_DRESS: // playroom服饰
|
case item.ITEM_TYPE_PLAYROOM_DRESS: // playroom服饰
|
||||||
Effect := itemCfg.GetItemEffect(v.Id)
|
Effect := itemCfg.GetItemEffect(v.Id)
|
||||||
PlayroomMod := p.PlayMod.getPlayroomMod()
|
PlayroomMod := p.PlayMod.getPlayroomMod()
|
||||||
PlayroomMod.AddDress(Effect)
|
PlayroomMod.AddDress(Effect, Label)
|
||||||
BackDataType[item.ITEM_TYPE_PLAYROOM_DRESS] = struct{}{}
|
BackDataType[item.ITEM_TYPE_PLAYROOM_DRESS] = struct{}{}
|
||||||
Type := playroomCfg.GetDressPart(Effect)
|
Type := playroomCfg.GetDressPart(Effect)
|
||||||
Name := playroomCfg.GetDressName(Effect)
|
Name := playroomCfg.GetDressName(Effect)
|
||||||
@ -726,7 +726,7 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
|||||||
if v == 0 {
|
if v == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
PlayroomMod.AddCollect(v)
|
PlayroomMod.AddCollect(v, Label)
|
||||||
Type, Name := playroomCfg.GetDecoInfo(v)
|
Type, Name := playroomCfg.GetDecoInfo(v)
|
||||||
p.TeLog("room_deco_get", map[string]interface{}{
|
p.TeLog("room_deco_get", map[string]interface{}{
|
||||||
"room_deco_type": Type,
|
"room_deco_type": Type,
|
||||||
|
|||||||
@ -581,14 +581,15 @@ func (p *PlayroomMod) SetRoom(Room map[int]int) (map[int]int, error) {
|
|||||||
return diff, nil
|
return diff, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PlayroomMod) AddCollect(Id int) {
|
func (p *PlayroomMod) AddCollect(Id int, Label string) {
|
||||||
p.NewCollect[Id] = &CollectInfo{
|
p.NewCollect[Id] = &CollectInfo{
|
||||||
Id: Id,
|
Id: Id,
|
||||||
AddTime: GoUtil.Now(),
|
AddTime: GoUtil.Now(),
|
||||||
|
Label: Label,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PlayroomMod) AddDress(Id int) {
|
func (p *PlayroomMod) AddDress(Id int, Label string) {
|
||||||
Part := playroomCfg.GetDressPart(Id)
|
Part := playroomCfg.GetDressPart(Id)
|
||||||
if _, ok := p.NewDress[Id]; !ok {
|
if _, ok := p.NewDress[Id]; !ok {
|
||||||
p.NewDress[Id] = &DressInfo{
|
p.NewDress[Id] = &DressInfo{
|
||||||
@ -596,7 +597,7 @@ func (p *PlayroomMod) AddDress(Id int) {
|
|||||||
Part: Part,
|
Part: Part,
|
||||||
AddTime: GoUtil.Now(),
|
AddTime: GoUtil.Now(),
|
||||||
EndTime: 0,
|
EndTime: 0,
|
||||||
Label: "",
|
Label: Label,
|
||||||
Num: 1,
|
Num: 1,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user