优化掉落系统
This commit is contained in:
1 parent
e9cacf064a
commit
c352746496
30 files changed
+350
-204
No files matched your search
@@ -228,3 +228,16 @@ func (a *DbAvatar) TakeOffWeapon(avatarId uint32, weapon *Weapon) {
|
||||
weapon.AvatarId = 0
|
||||
delete(avatar.EquipGuidMap, weapon.Guid)
|
||||
}
|
||||
|
||||
func (a *DbAvatar) GetAvatarElementType(avatarId uint32) int {
|
||||
avatar := a.AvatarMap[avatarId]
|
||||
skillDepotDataConfig := gdconf.GetAvatarSkillDepotDataById(int32(avatar.SkillDepotId))
|
||||
if skillDepotDataConfig == nil {
|
||||
return 0
|
||||
}
|
||||
avatarSkillDataConfig := gdconf.GetAvatarSkillDataById(skillDepotDataConfig.EnergySkill)
|
||||
if avatarSkillDataConfig == nil {
|
||||
return 0
|
||||
}
|
||||
return int(avatarSkillDataConfig.CostElemType)
|
||||
}
|
||||
Reference in new issue
Block a user