Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public unsafe static void RemoveMapMonster(ServerSockets.Packet stream, Role.GameMap map, uint ID, uint DinamicID = 0)
- {
- if (map.MonstersColletion == null)
- {
- Console.WriteLine(" Monsters collection is null.");
- return;
- }
- Game.MsgMonster.MonsterRole rolemonster = map.MonstersColletion.GetMonsterByID(ID, DinamicID);
- if (rolemonster == null)
- {
- Console.WriteLine("Monster not found.");
- return;
- }
- map.MonstersColletion.Remove(rolemonster);
- Game.MsgServer.ActionQuery action = new Game.MsgServer.ActionQuery()
- {
- ObjId = rolemonster.UID,
- Type = Game.MsgServer.ActionType.RemoveEntity
- };
- rolemonster.Send(stream.ActionCreate(&action));
- Console.WriteLine("Monster removed successfully.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement