New GetConLevel() for SoF+ clients
After I did some testing, I found a formula to calculate the exact conlevels of the mobs according to their color indicator. I added a new conlevel (CON_GRAY) to account for all mob colors the client (SoF+) is showing and a new rule for a green XP modifier.
Well, I am happy with it and would like to share: :) mob.h Code:
#define CON_GRAY 1 Code:
RULE_INT ( Character, GreenModifier, 20 ) Death() Code:
if(!IsLdonTreasure) { ShowSpawnWindow() Code:
switch(CurrentCon) { CheckIncreaseSkill() Code:
if(against_who) Group::SplitExp() Code:
int conlevel = Mob::GetLevelCon(maxlevel, other->GetLevel()); Raid::SplitExp() Code:
int conlevel = Mob::GetLevelCon(maxlevel, other->GetLevel()); Mob::CheckFlee() Code:
int32 con = GetLevelCon(hate_top->GetLevel(), GetLevel()); Code:
inline int32 GetLevelCon(int8 iOtherLevel) const { return(this?GetLevelCon(GetLevel(), iOtherLevel):CON_GRAY); } MobAI.cpp Code:
int32 Mob::GetLevelCon(int8 mylevel, int8 iOtherLevel) { |
Forgot 2 changes for aggro behavior:
aggro.cpp Mob::CheckWillAggro() Code:
if aggro.cpp EntityList::GetHatedCount() Code:
for(iterator.Reset(); iterator.MoreElements(); iterator.Advance()) { aggro.cpp EntityList::AIYellForHelp() Code:
//if they are in range, make sure we are not green... |
The con color functions are nice added functionality.
The aggro based on con color would be a good optional rule for the rules table |
All times are GMT -4. The time now is 06:35 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.