吾爱尚玩资源基地
标题:
供参考的WOWSF模拟器mangos会员天赋系统代码
[打印本页]
作者:
admin
时间:
2016-4-18 22:34
标题:
供参考的WOWSF模拟器mangos会员天赋系统代码
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));
}
作者:
爱上你的人
时间:
2016-10-12 20:07
楼主好棒,终于找到需要的了!有需求就来吾爱尚玩!
欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/)
Powered by Discuz! X3.4