武器强化以及返还材料功能

This commit is contained in:
UnKownOwO committed 2023-02-04 23:52:40 +08:00
1 parent 67821ba780
commit cfb001c18a
13 files changed
+614 -33

No files matched your search

+9
View File
@@ -43,6 +43,15 @@ func (p *Player) GetWeaponGuid(weaponId uint64) uint64 {
return weaponInfo.Guid
}
func (p *Player) GetWeaponIdByGuid(guid uint64) uint64 {
for weaponId, weapon := range p.WeaponMap {
if guid == weapon.Guid {
return weaponId
}
}
return 0
}
func (p *Player) GetWeapon(weaponId uint64) *Weapon {
return p.WeaponMap[weaponId]
}