mirror of
https://github.com/araxiaonline/mod-mythic-plus.git
synced 2026-06-13 11:12:23 -04:00
Updated EligibleDamageTarget additional safeguard on owner check.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#include "MpLogger.h"
|
||||
#include "MpDataStore.h"
|
||||
#include "MythicPlus.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
@@ -7,6 +9,27 @@ class MythicPlus_PlayerScript : public PlayerScript
|
||||
public:
|
||||
MythicPlus_PlayerScript() : PlayerScript("MythicPlus_PlayerScript") { }
|
||||
|
||||
void OnPlayerJustDied(Player* player, Unit* killer)
|
||||
{
|
||||
Map* map = player->GetMap();
|
||||
if(!sMythicPlus->IsMapEligible(map)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!killer) {
|
||||
return;
|
||||
}
|
||||
|
||||
MpGroupData *data = sMpDataStore->GetGroupData(player->GetGroup());
|
||||
|
||||
if (player->GetMap()->IsDungeon()) {
|
||||
MpLogger::debug("Player {} just died in dungeon {} by {}", player->GetName(), player->GetMap()->GetMapName(), killer->GetName());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void Add_MP_PlayerScripts()
|
||||
|
||||
Reference in New Issue
Block a user