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

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

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]
}