Ver Fonte

if map is loaded and the grid does not match the value set in the database, we override

Image há 4 anos atrás
pai
commit
2641486750
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      EQ2/source/WorldServer/Spawn.cpp

+ 5 - 0
EQ2/source/WorldServer/Spawn.cpp

@@ -2191,6 +2191,11 @@ void Spawn::ProcessMovement(bool isSpawnListLocked){
 	if (forceMapCheck && GetZone() != nullptr && zone->zonemap != nullptr && zone->zonemap->IsMapLoaded())
 	{
 		FixZ(true);
+
+		int32 newGrid = GetZone()->Grid->GetGridID(this);
+		if (!IsFlying() && newGrid != 0 && newGrid != appearance.pos.grid_id)
+			SetPos(&(appearance.pos.grid_id), newGrid);
+
 		forceMapCheck = false;
 	}