mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 15:52:27 +08:00
武器强化以及返还材料功能
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user