mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 21:40:05 +00:00
Update unsummonW to handle new group gruntwork format
This commit is contained in:
parent
98ae236c08
commit
85113a667f
@ -278,7 +278,8 @@ void unsummonWCommand(std::string full, std::vector<std::string>& args, CNSocket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TableData::RunningMobs.find(npc->appearanceData.iNPC_ID) == TableData::RunningMobs.end()) {
|
if (TableData::RunningMobs.find(npc->appearanceData.iNPC_ID) == TableData::RunningMobs.end()
|
||||||
|
&& TableData::RunningGroups.find(npc->appearanceData.iNPC_ID) == TableData::RunningGroups.end()) {
|
||||||
ChatManager::sendServerMessage(sock, "/unsummonW: Closest NPC is not a gruntwork mob.");
|
ChatManager::sendServerMessage(sock, "/unsummonW: Closest NPC is not a gruntwork mob.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -298,10 +299,9 @@ void unsummonWCommand(std::string full, std::vector<std::string>& args, CNSocket
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
TableData::RunningMobs.erase(leadNpc->groupMember[i]);
|
|
||||||
NPCManager::destroyNPC(leadNpc->groupMember[i]);
|
NPCManager::destroyNPC(leadNpc->groupMember[i]);
|
||||||
}
|
}
|
||||||
TableData::RunningMobs.erase(leadId);
|
TableData::RunningGroups.erase(leadId);
|
||||||
NPCManager::destroyNPC(leadId);
|
NPCManager::destroyNPC(leadId);
|
||||||
ChatManager::sendServerMessage(sock, "/unsummonW: Mob group destroyed.");
|
ChatManager::sendServerMessage(sock, "/unsummonW: Mob group destroyed.");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user