[Client] Assign summoned creatures' actorId correctly, skipping those already assigned

pull/556/head
uramer 5 years ago
parent dae76b91ee
commit 3e7230e89d

@ -751,7 +751,7 @@ namespace MWMechanics
{
for (std::map<CreatureStats::SummonKey, int>::iterator it = mSummonedCreatures.begin(); it != mSummonedCreatures.end(); )
{
if (Misc::StringUtils::ciEqual(getSummonedCreature(it->first.first), refId))
if (Misc::StringUtils::ciEqual(getSummonedCreature(it->first.first), refId) && it->second == -1)
{
it->second = actorId;
break;

@ -4,6 +4,7 @@
#include <string>
#include <memory>
#include <unordered_map>
#include <stdexcept>
#define BPP_INIT(packet_id) packetID = packet_id; strPacketID = #packet_id; className = typeid(this).name(); avoidReading = false;

Loading…
Cancel
Save