diff --git a/data/DB_PropExchange.dat b/data/DB_PropExchange.dat index c1efe95..773eddb 100644 Binary files a/data/DB_PropExchange.dat and b/data/DB_PropExchange.dat differ diff --git a/data/DB_Task.dat b/data/DB_Task.dat index e169847..5ed821d 100644 Binary files a/data/DB_Task.dat and b/data/DB_Task.dat differ diff --git a/public b/public index 6419023..085f01d 160000 --- a/public +++ b/public @@ -1 +1 @@ -Subproject commit 64190233130f2868d1cf6ecd2be04d9b13073ae2 +Subproject commit 085f01d57005ff2e025bb0bb40740ac170620cdf diff --git a/worldsrv/action_pets.go b/worldsrv/action_pets.go index 3c3b277..ee9b9b4 100644 --- a/worldsrv/action_pets.go +++ b/worldsrv/action_pets.go @@ -578,6 +578,11 @@ func SkinUnLock(p *Player, id int32) (*pets.SkinInfo, pets.OpResultCode) { } p.SendToClient(int(pets.PetsPacketID_PACKET_SC_SKIN_UNLOCK), pack) logger.Logger.Tracef("SCSkinUnlock: %v", pack) + + // 自动使用 + if srvdata.PBDB_SkinMgr.GetData(id).GetUnlockType() == common.SkinGetAuto { + CSSkinUse(p.gateSess, int(pets.PetsPacketID_PACKET_CS_SKIN_USE), &pets.CSSkinUse{Id: id}, p.sid) + } return pack.Info, pets.OpResultCode_OPRC_Sucess } @@ -605,11 +610,6 @@ func CSSKinUnLock(s *netlib.Session, packetid int, data interface{}, sid int64) pack.Info, pack.RetCode = SkinUnLock(p, msg.GetId()) if pack.GetRetCode() != pets.OpResultCode_OPRC_Sucess { send() - } else { - // 自动使用 - if srvdata.PBDB_SkinMgr.GetData(msg.GetId()).GetUnlockType() == common.SkinGetAuto { - CSSkinUse(s, int(pets.PetsPacketID_PACKET_CS_SKIN_USE), new(pets.CSSkinUse), sid) - } } return nil }