public bool RemoveMob(IFieldObject <Mob> mob) { if (!State.RemoveMob(mob.ObjectId)) { return(false); } Broadcast(session => { session.Send(FieldPacket.RemoveMob(mob)); }); return(true); }
public bool RemoveMob(IFieldObject <Mob> mob) { if (!State.RemoveMob(mob.ObjectId)) { return(false); } if (mob.Value.OriginSpawn.Value.Mobs.Remove(mob) && mob.Value.OriginSpawn.Value.Mobs.Count == 0) { StartSpawnTimer(mob.Value.OriginSpawn); } Broadcast(session => { session.Send(FieldPacket.RemoveMob(mob)); }); return(true); }