mirror of
https://github.com/mangosfour/server.git
synced 2026-01-01 07:37:07 +00:00
[SD3] first commit with SD3 inplace - not complete yet
This commit is contained in:
parent
35415eb738
commit
afc2df2f7d
603 changed files with 222771 additions and 1729 deletions
|
|
@ -26,23 +26,24 @@
|
|||
#include "Database/DatabaseEnv.h"
|
||||
#include "Map.h"
|
||||
#include "Log.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
void InstanceData::SaveToDB() const
|
||||
{
|
||||
// no reason to save BGs/Arenas
|
||||
if (instance->IsBattleGroundOrArena())
|
||||
return;
|
||||
{ return; }
|
||||
|
||||
if (!Save())
|
||||
return;
|
||||
{ return; }
|
||||
|
||||
std::string data = Save();
|
||||
CharacterDatabase.escape_string(data);
|
||||
|
||||
if (instance->Instanceable())
|
||||
CharacterDatabase.PExecute("UPDATE instance SET data = '%s' WHERE id = '%u'", data.c_str(), instance->GetInstanceId());
|
||||
{ CharacterDatabase.PExecute("UPDATE instance SET data = '%s' WHERE id = '%u'", data.c_str(), instance->GetInstanceId()); }
|
||||
else
|
||||
CharacterDatabase.PExecute("UPDATE world SET data = '%s' WHERE map = '%u'", data.c_str(), instance->GetId());
|
||||
{ CharacterDatabase.PExecute("UPDATE world SET data = '%s' WHERE map = '%u'", data.c_str(), instance->GetId()); }
|
||||
}
|
||||
|
||||
bool InstanceData::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= NULL*/, uint32 /*miscvalue1*/ /*= 0*/) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue