Index: Player.cpp===================================================================
--- Player.cpp (revision 573)
+++ Player.cpp (working copy)
@@ -21339,26 +21350,30 @@
uint32 base_talent = getLevel() < 10 ? 0 : getLevel()-9;
uint32 mGmlevel = GetSession()->GetSecurity();
+ uint32 VipTalentPoint;
+ if(mGmlevel > 0 && sConfig.GetIntDefault("Vip.Player.On.Off", 0) == 1 ) //判断是否是会员
+ VipTalentPoint = sObjectMgr.GetTalentVipAdd(mGmlevel);
+ else
+ VipTalentPoint = 0;
+
if(getClass() != CLASS_DEATH_KNIGHT)
{
- if(mGmlevel > 0 && sConfig.GetIntDefault("Vip.Player.On.Off", 0) == 1 ) //判断是否是会员
- return uint32(base_talent * sWorld.getRate(RATE_TALENT)+sObjectMgr.GetTalentVipAdd(mGmlevel));//会员天赋系统(player_vip_template)
- else if(GetTeam() == ALLIANCE)//判断是否是联盟
- return uint32(base_talent * sWorld.getRate(RATE_TALENT)+sConfig.GetFloatDefault("Rate.Talent.Alliance",0));
+ if(GetTeam() == ALLIANCE)//判断是否是联盟
+ return uint32(base_talent * sWorld.getRate(RATE_TALENT) + sConfig.GetFloatDefault("Rate.Talent.Alliance",0) + VipTalentPoint);
else
- return uint32(base_talent * sWorld.getRate(RATE_TALENT)+sConfig.GetFloatDefault("Rate.Talent.Horde",0));
+ return uint32(base_talent * sWorld.getRate(RATE_TALENT) + sConfig.GetFloatDefault("Rate.Talent.Horde",0) + VipTalentPoint);
}
uint32 talentPointsForLevel = getLevel() < 56 ? 0 : getLevel() - 55;
talentPointsForLevel += m_questRewardTalentCount + sConfig.GetIntDefault("Rate.Talent.Death.Knight",0);
- if (mGmlevel > 0 && sConfig.GetIntDefault("Vip.Player.On.Off", 0) == 1 )//独立死亡骑士的VIP天赋
- {
- talentPointsForLevel += sObjectMgr.GetTalentVipAdd(mGmlevel);
- }
+
+ talentPointsForLevel += VipTalentPoint;
+
+ uint32 base_talent_DK = base_talent + sConfig.GetIntDefault("Rate.Talent.Death.Knight",0);
+ base_talent_DK += VipTalentPoint;
+ if(talentPointsForLevel > base_talent_DK)
+ talentPointsForLevel = base_talent_DK;
- if(talentPointsForLevel > base_talent)
- talentPointsForLevel = base_talent;
-
return uint32(talentPointsForLevel * sWorld.getRate(RATE_TALENT));
}
|