mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
refactor(Core/Instances): Update CHAR_DELETE_INSTANCE_SAVED_DATA (#11866)
* Update InstanceSaveMgr.cpp * Update Group.cpp * Update InstanceSaveMgr.cpp * Update InstanceSaveMgr.h * Update InstanceSaveMgr.cpp * Update InstanceSaveMgr.h * Update InstanceSaveMgr.cpp * Update InstanceSaveMgr.h * Update InstanceSaveMgr.cpp * Update Group.cpp * Update PlayerMisc.cpp * Update InstanceSaveMgr.h * Update Group.cpp * Update PlayerMisc.cpp * Update Group.cpp * Update Group.cpp * Update InstanceSaveMgr.cpp * Update InstanceSaveMgr.h * Update Group.h * Update InstanceSaveMgr.cpp * Update InstanceSaveMgr.cpp * Update InstanceSaveMgr.cpp
This commit is contained in:
@@ -829,12 +829,7 @@ void Group::Disband(bool hideDestroy /* = false */)
|
||||
}
|
||||
|
||||
// Cleaning up instance saved data for gameobjects when a group is disbanded
|
||||
if (instanceId)
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DELETE_INSTANCE_SAVED_DATA);
|
||||
stmt->SetData(0, instanceId);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
sInstanceSaveMgr->DeleteInstanceSavedData(instanceId);
|
||||
|
||||
sGroupMgr->RemoveGroup(this);
|
||||
delete this;
|
||||
@@ -2037,16 +2032,6 @@ void Group::SetRaidDifficulty(Difficulty difficulty)
|
||||
}
|
||||
}
|
||||
|
||||
void Group::ResetInstanceSavedGameobjects(uint32 instanceId)
|
||||
{
|
||||
if (instanceId)
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DELETE_INSTANCE_SAVED_DATA);
|
||||
stmt->SetData(0, instanceId);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
}
|
||||
|
||||
void Group::ResetInstances(uint8 method, bool isRaid, Player* leader)
|
||||
{
|
||||
if (isBGGroup() || isBFGroup() || isLFGGroup())
|
||||
@@ -2078,7 +2063,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* leader)
|
||||
leader->SendResetInstanceFailed(0, instanceSave->GetMapId());
|
||||
}
|
||||
|
||||
ResetInstanceSavedGameobjects(instanceSave->GetInstanceId());
|
||||
sInstanceSaveMgr->DeleteInstanceSavedData(instanceSave->GetInstanceId());
|
||||
}
|
||||
for (std::vector<InstanceSave*>::const_iterator itr = toUnbind.begin(); itr != toUnbind.end(); ++itr)
|
||||
sInstanceSaveMgr->UnbindAllFor(*itr);
|
||||
@@ -2106,7 +2091,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* leader)
|
||||
leader->SendResetInstanceFailed(0, instanceSave->GetMapId());
|
||||
}
|
||||
|
||||
ResetInstanceSavedGameobjects(instanceSave->GetInstanceId());
|
||||
sInstanceSaveMgr->DeleteInstanceSavedData(instanceSave->GetInstanceId());
|
||||
}
|
||||
for (std::vector<InstanceSave*>::const_iterator itr = toUnbind.begin(); itr != toUnbind.end(); ++itr)
|
||||
sInstanceSaveMgr->UnbindAllFor(*itr);
|
||||
|
||||
Reference in New Issue
Block a user