Added optional rule for allowing bots to auto-update with their owner.

(Run the optional sql script to activate this feature)
This commit is contained in:
Uleat
2014-03-31 09:31:49 -04:00
parent d939820918
commit 955f164efb
7 changed files with 69 additions and 9 deletions
+11
View File
@@ -326,7 +326,18 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
}
else
Message(15, "Welcome to level %i!", check_level);
#ifdef BOTS
uint8 myoldlevel = GetLevel();
#endif
SetLevel(check_level);
#ifdef BOTS
if(RuleB(Bots, BotLevelsWithOwner))
// hack way of doing this..but, least invasive... (same criteria as gain level for sendlvlapp)
Bot::LevelBotWithClient(this, GetLevel(), (myoldlevel==check_level-1));
#endif
}
//If were at max level then stop gaining experience if we make it to the cap