优化代码格式

This commit is contained in:
huangxiaolei
2022-12-08 18:23:41 +08:00
parent b836c0f8db
commit 3615ad194a
16 changed files with 720 additions and 727 deletions
+5 -4
View File
@@ -38,7 +38,7 @@ func (g *GameManager) GetAllWeaponDataConfig() map[int32]*gdc.ItemData {
}
func (g *GameManager) AddUserWeapon(userId uint32, itemId uint32) uint64 {
player := g.userManager.GetOnlineUser(userId)
player := USER_MANAGER.GetOnlineUser(userId)
if player == nil {
logger.LOG.Error("player is nil, uid: %v", userId)
return 0
@@ -51,9 +51,10 @@ func (g *GameManager) AddUserWeapon(userId uint32, itemId uint32) uint64 {
return 0
}
// PacketStoreItemChangeNotify
storeItemChangeNotify := new(proto.StoreItemChangeNotify)
storeItemChangeNotify.StoreType = proto.StoreType_STORE_TYPE_PACK
storeItemChangeNotify := &proto.StoreItemChangeNotify{
StoreType: proto.StoreType_STORE_TYPE_PACK,
ItemList: make([]*proto.Item, 0),
}
affixMap := make(map[uint32]uint32)
for _, affixId := range weapon.AffixIdList {
affixMap[affixId] = uint32(weapon.Refinement)