Core/Scripts: Save instance data in JSON format

This commit is contained in:
Shauren
2020-01-03 21:55:45 +01:00
parent 9b924522d0
commit 76be303351
40 changed files with 742 additions and 1220 deletions
+15 -15
View File
@@ -164,23 +164,23 @@ public:
static bool HandleInstanceSaveDataCommand(ChatHandler* handler)
{
Player* player = handler->GetSession()->GetPlayer();
InstanceMap* map = player->GetMap()->ToInstanceMap();
if (!map)
{
handler->PSendSysMessage(LANG_NOT_DUNGEON);
handler->SetSentErrorMessage(true);
return false;
}
//Player* player = handler->GetSession()->GetPlayer();
//InstanceMap* map = player->GetMap()->ToInstanceMap();
//if (!map)
//{
// handler->PSendSysMessage(LANG_NOT_DUNGEON);
// handler->SetSentErrorMessage(true);
// return false;
//}
if (!map->GetInstanceScript())
{
handler->PSendSysMessage(LANG_NO_INSTANCE_DATA);
handler->SetSentErrorMessage(true);
return false;
}
//if (!map->GetInstanceScript())
//{
// handler->PSendSysMessage(LANG_NO_INSTANCE_DATA);
// handler->SetSentErrorMessage(true);
// return false;
//}
map->GetInstanceScript()->SaveToDB();
//map->GetInstanceScript()->SaveToDB();
return true;
}