mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
Add another layer of randomization to roam box logic, npc's who weren't originally spawned in water won't roambox into water
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "raids.h"
|
||||
#include "string_ids.h"
|
||||
#include "worldserver.h"
|
||||
#include "water_map.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
@@ -686,6 +687,15 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether NPC was spawned in or out of water
|
||||
*/
|
||||
if (zone->HasMap() && zone->HasWaterMap()) {
|
||||
npc->SetSpawnedInWater(false);
|
||||
if (zone->watermap->InLiquid(npc->GetPosition())) {
|
||||
npc->SetSpawnedInWater(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EntityList::AddMerc(Merc *merc, bool SendSpawnPacket, bool dontqueue)
|
||||
|
||||
Reference in New Issue
Block a user