武器突破以及精炼功能

This commit is contained in:
UnKownOwO
2023-02-05 16:01:48 +08:00
parent b2530509ab
commit 482a1f7af4
9 changed files with 356 additions and 19 deletions

View File

@@ -79,3 +79,12 @@ func (p *Player) AddWeapon(itemId uint32, weaponId uint64) {
p.InitWeapon(weapon)
p.WeaponMap[weaponId] = weapon
}
func (p *Player) CostWeapon(weaponId uint64) uint64 {
weapon := p.WeaponMap[weaponId]
if weapon == nil {
return 0
}
delete(p.WeaponMap, weaponId)
return weapon.Guid
}