Misc fixes
This commit is contained in:
@@ -552,7 +552,7 @@ namespace Game.Chat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
handler.SendSysMessage($" | |-- '{groupData.name}' could've been {(isSpawn ? "allowed to spawn" : "blocked from spawning")} if boss state {bossStateId} matched mask {tuple.Item3}; but it is {(EncounterState)actualState} . {(1 << (int)actualState)}, which does not match.");
|
handler.SendSysMessage($" | |-- '{groupData.name}' could've been {(isSpawn ? "allowed to spawn" : "blocked from spawning")} if boss state {bossStateId} matched mask 0x{tuple.Item3:X2}; but it is {(EncounterState)actualState} . 0x{(1 << (int)actualState):X2}, which does not match.");
|
||||||
}
|
}
|
||||||
if (isBlocked)
|
if (isBlocked)
|
||||||
handler.SendSysMessage($" | |=> '{groupData.name}' is not active due to a blocking rule being matched");
|
handler.SendSysMessage($" | |=> '{groupData.name}' is not active due to a blocking rule being matched");
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ namespace Game.Chat
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player player = handler.GetSession().GetPlayer();
|
Player player = handler.GetSession().GetPlayer();
|
||||||
|
if (!player.GetMap().SpawnGroupDespawn(groupId, deleteRespawnTimes, out int despawnedCount))
|
||||||
if (!player.GetMap().SpawnGroupDespawn(groupId, deleteRespawnTimes))
|
|
||||||
{
|
{
|
||||||
handler.SendSysMessage(CypherStrings.SpawngroupBadgroup, groupId);
|
handler.SendSysMessage(CypherStrings.SpawngroupBadgroup, groupId);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
handler.SendSysMessage($"Despawned a total of {despawnedCount} objects.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -454,8 +454,6 @@ namespace Game.Chat
|
|||||||
}
|
}
|
||||||
|
|
||||||
handler.SendSysMessage(CypherStrings.SpawngroupSpawncount, creatureList.Count);
|
handler.SendSysMessage(CypherStrings.SpawngroupSpawncount, creatureList.Count);
|
||||||
foreach (WorldObject obj in creatureList)
|
|
||||||
handler.SendSysMessage($"{obj.GetName()} ({obj.GetGUID()})");
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2759,6 +2759,11 @@ namespace Game.Maps
|
|||||||
|
|
||||||
public bool SpawnGroupDespawn(uint groupId, bool deleteRespawnTimes)
|
public bool SpawnGroupDespawn(uint groupId, bool deleteRespawnTimes)
|
||||||
{
|
{
|
||||||
|
return SpawnGroupDespawn(groupId, deleteRespawnTimes, out _);
|
||||||
|
}
|
||||||
|
public bool SpawnGroupDespawn(uint groupId, bool deleteRespawnTimes, out int count)
|
||||||
|
{
|
||||||
|
count = 0;
|
||||||
SpawnGroupTemplateData groupData = GetSpawnGroupData(groupId);
|
SpawnGroupTemplateData groupData = GetSpawnGroupData(groupId);
|
||||||
if (groupData == null || groupData.flags.HasAnyFlag(SpawnGroupFlags.System))
|
if (groupData == null || groupData.flags.HasAnyFlag(SpawnGroupFlags.System))
|
||||||
{
|
{
|
||||||
@@ -2793,6 +2798,8 @@ namespace Game.Maps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
count = toUnload.Count;
|
||||||
|
|
||||||
// now do the actual despawning
|
// now do the actual despawning
|
||||||
foreach (WorldObject obj in toUnload)
|
foreach (WorldObject obj in toUnload)
|
||||||
obj.AddObjectToRemoveList();
|
obj.AddObjectToRemoveList();
|
||||||
|
|||||||
Reference in New Issue
Block a user