mirror of
https://github.com/araxiaonline/mod-mythic-plus.git
synced 2026-06-13 03:02:24 -04:00
Turned on player scripts have segfault in bind to instance that needs fixed.
This commit is contained in:
@@ -84,14 +84,6 @@ void MpDataStore::AddGroupData(Group *group, MpGroupData groupData) {
|
||||
_groupData->emplace(guid, groupData);
|
||||
|
||||
}
|
||||
|
||||
MpLogger::debug("Add Group difficulty for group {} to {}", guid.GetCounter());
|
||||
|
||||
CharacterDatabase.Execute("REPLACE INTO group_difficulty (guid, difficulty) VALUES ({},{}) ",
|
||||
guid.GetCounter(),
|
||||
groupData.difficulty
|
||||
);
|
||||
|
||||
const Group::MemberSlotList members = group->GetMemberSlots();
|
||||
for (const auto &memberSlot : members) {
|
||||
Player* player = ObjectAccessor::FindPlayer(memberSlot.guid);
|
||||
|
||||
@@ -25,7 +25,7 @@ void Addmod_mythic_plusScripts()
|
||||
Add_MP_CommandScripts();
|
||||
Add_MP_GlobalScripts();
|
||||
// Add_MP_GroupScripts();
|
||||
// Add_MP_PlayerScripts();
|
||||
Add_MP_PlayerScripts();
|
||||
Add_MP_UnitScripts();
|
||||
Add_MP_WorldScripts();
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ class MythicPlus_PlayerScript : public PlayerScript
|
||||
public:
|
||||
MythicPlus_PlayerScript() : PlayerScript("MythicPlus_PlayerScript") { }
|
||||
|
||||
void OnPlayerJustDied(Player* player, Unit* killer)
|
||||
void OnPlayerKilledByCreature(Player* player, Unit* killer)
|
||||
{
|
||||
MpLogger::debug("OnPlayerJustDied: %s", player->GetName());
|
||||
|
||||
Map* map = player->GetMap();
|
||||
if(!sMythicPlus->IsMapEligible(map)) {
|
||||
return;
|
||||
@@ -22,11 +24,13 @@ public:
|
||||
|
||||
MpGroupData *data = sMpDataStore->GetGroupData(player->GetGroup());
|
||||
if (!data) {
|
||||
MpLogger::error("OnPlayerJustDied: No group data found for %s", player->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
MpPlayerData *playerData = sMpDataStore->GetPlayerData(player->GetGUID());
|
||||
if (!playerData) {
|
||||
MpLogger::error("OnPlayerJustDied: No player data found for %s", player->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user