Index: Player.cpp===================================================================
--- Player.cpp (revision 524)
+++ Player.cpp (working copy)
@@ -623,11 +623,13 @@
uint32 mGmlevel=GetSession()->GetSecurity();
if (mGmlevel > 0 && sConfig.GetIntDefault("Vip.Player.On.Off", 0) == 1)
- {
+ { //会员出生等级
start_level += sObjectMgr.GetStartPlayerLevelVip(mGmlevel);
- if (start_level > sConfig.GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL))
+ uint32 ssGetMaxLevel = sConfig.GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
+ if (start_level > ssGetMaxLevel)
{
- start_level = sConfig.GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
+ sLog.outError("MgCore::GmLevel %u StatLevel must be in range 0..%u.", mGmlevel, ssGetMaxLevel);
+ start_level = ssGetMaxLevel;
}
}
SetUInt32Value(UNIT_FIELD_LEVEL, start_level);
@@ -646,16 +648,18 @@
cStartPlayerMoneyVip = MAX_MONEY_AMOUNT;
}
//VIP出生荣誉点
- if (cStartHonorPointsVip > sConfig.GetIntDefault("MaxHonorPoints", 75000))
+ uint32 ssGetMaxHonor = sConfig.GetIntDefault("MaxHonorPoints", 75000);
+ if (cStartHonorPointsVip > ssGetMaxHonor)
{
- sLog.outError("MgCore::GmLevel %u StartHonorPoints must be in range 0..%u.", mGmlevel, sConfig.GetIntDefault("MaxHonorPoints", 75000));
- cStartHonorPointsVip = sConfig.GetIntDefault("MaxHonorPoints", 75000);
+ sLog.outError("MgCore::GmLevel %u StartHonorPoints must be in range 0..%u.", mGmlevel, ssGetMaxHonor);
+ cStartHonorPointsVip = ssGetMaxHonor;
}
//VIP出生竞技点
- if (cStartArenaPointsVip > sConfig.GetIntDefault("MaxArenaPoints", 5000))
+ uint32 ssGetMaxArena = sConfig.GetIntDefault("MaxArenaPoints", 5000);
+ if (cStartArenaPointsVip > ssGetMaxArena)
{
- sLog.outError("MgCore::GmLevel %u StartArenaPoints must be in range 0..%u.", mGmlevel, sConfig.GetIntDefault("MaxArenaPoints", 5000));
- cStartArenaPointsVip = sConfig.GetIntDefault("MaxArenaPoints", 5000);
+ sLog.outError("MgCore::GmLevel %u StartArenaPoints must be in range 0..%u.", mGmlevel, ssGetMaxArena);
+ cStartArenaPointsVip = ssGetMaxArena;
}
SetUInt32Value (PLAYER_FIELD_COINAGE, cStartPlayerMoneyVip);
SetUInt32Value (PLAYER_FIELD_HONOR_CURRENCY, cStartHonorPointsVip);
@@ -3315,7 +3319,12 @@
uint32 mGmlevel = GetSession()->GetSecurity();//Fiver会员商业技能数量
if ( mGmlevel >0 && sConfig.GetIntDefault("Vip.Player.On.Off", 0) == 1)
{
- if(freeProfs <= (sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL) + sObjectMgr.GetMaxPrimaryTradeSkillVip(mGmlevel)))
+ if (sObjectMgr.GetMaxPrimaryTradeSkillVip(mGmlevel) > 10 )
+ {
+ sLog.outError("MgCore::GmLevel %u MaxPrimaryTradeSkill must be in range 0..10.", mGmlevel);
+ sObjectMgr.GetMaxPrimaryTradeSkillVip(mGmlevel) = 10;
+ }
+ if(freeProfs <= sObjectMgr.GetMaxPrimaryTradeSkillVip(mGmlevel))
SetFreePrimaryProfessions(freeProfs);
}
else
@@ -18783,7 +18792,13 @@
uint32 mGmlevel = GetSession()->GetSecurity();//Fiver会员商业技能数量
if ( mGmlevel >0 && sConfig.GetIntDefault("Vip.Player.On.Off", 0) == 1 )
{
- SetFreePrimaryProfessions(sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL) + sObjectMgr.GetMaxPrimaryTradeSkillVip(mGmlevel));
+ if (sObjectMgr.GetMaxPrimaryTradeSkillVip(mGmlevel) > 10)//10是最大MaxPrimaryTradeSkill
+ {
+ sLog.outError("MgCore::GmLevel %u MaxPrimaryTradeSkill must be in range 0..10.", mGmlevel);
+ sObjectMgr.GetMaxPrimaryTradeSkillVip(mGmlevel) = 10;
+ }
+
+ SetFreePrimaryProfessions(sObjectMgr.GetMaxPrimaryTradeSkillVip(mGmlevel));
}
else
SetFreePrimaryProfessions(sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL));
|