private bool BeingAttacked(GameClient Client) { foreach (RoomUser MafiaBot in this.GetRoomUser().GetRoom().GetRoomUserManager().GetBotList()) { if (MafiaBot == this.GetRoomUser()) { continue; } if (MafiaBot.GetBotRoleplay() == null) { continue; } if (!MafiaBot.GetBotRoleplay().Attacking) { continue; } if (!MafiaBot.GetBotRoleplay().ActiveHandlers.ContainsKey(Handlers.ATTACK)) { continue; } if (MafiaBot.GetBotRoleplay().ActiveHandlers[Handlers.ATTACK].InteractingUser == Client) { return(true); } } return(false); }
private void CallOtherBots(GameClient Client) { foreach (RoomUser MafiaBot in this.GetRoom().GetRoomUserManager().GetBotList()) { if (MafiaBot == this.GetRoomUser()) { continue; } if (MafiaBot == null) { continue; } if (MafiaBot.GetBotRoleplayAI() == null) { continue; } if (MafiaBot.GetBotRoleplay() == null) { continue; } IBotHandler AttackHandler; if (MafiaBot.GetBotRoleplay().TryGetHandler(Handlers.ATTACK, out AttackHandler)) { continue; } MafiaBot.GetBotRoleplayAI().OnAttacked(Client); } }