Browse Source

Do not spawn monsters in town

pull/7987/head
staphen 10 months ago committed by Stephen C. Wills
parent
commit
e3460a072d
  1. 4
      Source/msg.cpp

4
Source/msg.cpp

@ -1842,7 +1842,7 @@ size_t OnRequestSpawnGolem(const TCmdLocParam1 &message, const Player &player)
const WorldTilePosition position { message.x, message.y };
if (player.isLevelOwnedByLocalClient() && InDungeonBounds(position))
if (player.plrlevel > 0 && player.isLevelOwnedByLocalClient() && InDungeonBounds(position))
SpawnGolem(player, position, static_cast<uint8_t>(message.wParam1));
return sizeof(message);
@ -2391,6 +2391,8 @@ size_t OnSpawnMonster(const TCmdSpawnMonster &message, const Player &player)
{
if (gbBufferMsgs == 1)
return sizeof(message);
if (player.plrlevel == 0)
return sizeof(message);
const WorldTilePosition position { message.x, message.y };

Loading…
Cancel
Save