mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Defense check on the player itself
This commit is contained in:
@@ -209,8 +209,8 @@ public:
|
|||||||
|
|
||||||
void OnPlayerGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 /*xpSource*/) override
|
void OnPlayerGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 /*xpSource*/) override
|
||||||
{
|
{
|
||||||
// when default no XP scaling.
|
// early return
|
||||||
if (sPlayerbotAIConfig->randomBotXPRate == 1.0)
|
if (sPlayerbotAIConfig->randomBotXPRate == 1.0 || !player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// when player is no bot.
|
// when player is no bot.
|
||||||
|
|||||||
Reference in New Issue
Block a user