mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9635] Restore load/save shown action bars.
Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
d85e4228f1
commit
8e25d43443
8 changed files with 26 additions and 14 deletions
|
|
@ -100,6 +100,9 @@ bool Corpse::Create( uint32 guidlow, Player *owner)
|
|||
|
||||
void Corpse::SaveToDB()
|
||||
{
|
||||
// bones should not be saved to DB (would be deleted on startup anyway)
|
||||
assert(GetType() != CORPSE_BONES);
|
||||
|
||||
// prevent DB data inconsistence problems and duplicates
|
||||
CharacterDatabase.BeginTransaction();
|
||||
DeleteFromDB();
|
||||
|
|
@ -137,12 +140,11 @@ void Corpse::DeleteBonesFromWorld()
|
|||
|
||||
void Corpse::DeleteFromDB()
|
||||
{
|
||||
if(GetType() == CORPSE_BONES)
|
||||
// only specific bones
|
||||
CharacterDatabase.PExecute("DELETE FROM corpse WHERE guid = '%d'", GetGUIDLow());
|
||||
else
|
||||
// all corpses (not bones)
|
||||
CharacterDatabase.PExecute("DELETE FROM corpse WHERE player = '%d' AND corpse_type <> '0'", GUID_LOPART(GetOwnerGUID()));
|
||||
// bones should not be saved to DB (would be deleted on startup anyway)
|
||||
assert(GetType() != CORPSE_BONES);
|
||||
|
||||
// all corpses (not bones)
|
||||
CharacterDatabase.PExecute("DELETE FROM corpse WHERE player = '%d' AND corpse_type <> '0'", GUID_LOPART(GetOwnerGUID()));
|
||||
}
|
||||
|
||||
bool Corpse::LoadFromDB(uint32 guid, Field *fields)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue