DB/SpawnGroup: Instance spawn group data for Tempest Keep: The Eye and Hellfire Citadel: Ramparts.

(also some minor adjustments to command output for convenience)
This commit is contained in:
Treeston
2018-01-25 13:45:11 +01:00
parent 6c3c200cc5
commit 51e28ae76a
6 changed files with 376 additions and 7 deletions

View File

@@ -41,6 +41,8 @@ EndScriptData */
#include "Transport.h"
#include <fstream>
#include <limits>
#include <map>
#include <set>
class debug_commandscript : public CommandScript
{
@@ -1756,7 +1758,7 @@ public:
return false;
}
auto const& spawnGroups = *instance->_instanceSpawnGroups;
std::unordered_map<uint32, std::set<std::tuple<bool, uint8, uint8>>> store;
std::map<uint32, std::set<std::tuple<bool, uint8, uint8>>> store;
for (InstanceSpawnGroupInfo const& info : spawnGroups)
{
if (groupID && info.SpawnGroupId != groupID)
@@ -1813,7 +1815,7 @@ public:
}
}
else
handler->PSendSysMessage(" | |-- '%s' could've been %s if boss state %u matched mask %u; but it is %s -> %u, which does not match.",
handler->PSendSysMessage(" | |-- '%s' could've been %s if boss state %u matched mask 0x%02x; but it is %s -> 0x%02x, which does not match.",
groupData->name, isSpawn ? "allowed to spawn" : "blocked from spawning", bossStateId, std::get<2>(tuple), InstanceScript::GetBossStateName(actualState), (1 << actualState));
}
if (isBlocked)

View File

@@ -216,8 +216,6 @@ bool HandleNpcSpawnGroup(ChatHandler* handler, char const* args)
}
handler->PSendSysMessage(LANG_SPAWNGROUP_SPAWNCOUNT, creatureList.size());
for (WorldObject* obj : creatureList)
handler->PSendSysMessage("%s (%s)", obj->GetName(), obj->GetGUID().ToString().c_str());
return true;
}
@@ -248,12 +246,14 @@ bool HandleNpcDespawnGroup(ChatHandler* handler, char const* args)
Player* player = handler->GetSession()->GetPlayer();
if (!player->GetMap()->SpawnGroupDespawn(groupId, deleteRespawnTimes))
size_t n = 0;
if (!player->GetMap()->SpawnGroupDespawn(groupId, deleteRespawnTimes, &n))
{
handler->PSendSysMessage(LANG_SPAWNGROUP_BADGROUP, groupId);
handler->SetSentErrorMessage(true);
return false;
}
handler->PSendSysMessage("Despawned a total of %zu objects.", n);
return true;
}