public JoinSpectator ( AbstractFight fight ) : void | ||
fight | AbstractFight | |
Résultat | void |
/// <summary> /// /// </summary> /// <param name="character"></param> public void TrySpectate(CharacterEntity character) { AddMessage(() => { if (LoopState == FightLoopStateEnum.STATE_WAIT_END || LoopState == FightLoopStateEnum.STATE_ENDED) { character.Dispatch(WorldMessage.BASIC_NO_OPERATION()); return; } if (State != FightStateEnum.STATE_FIGHTING) { Logger.Debug("FightBase::TrySpectate cannot spectate placement " + character.Name); character.Dispatch(WorldMessage.INFORMATION_MESSAGE(InformationTypeEnum.ERROR, InformationEnum.ERROR_FIGHT_SPECTATOR_LOCKED)); return; } if (!SpectatorTeam.CanJoin) { character.Dispatch(WorldMessage.INFORMATION_MESSAGE(InformationTypeEnum.ERROR, InformationEnum.ERROR_FIGHT_SPECTATOR_LOCKED)); return; } character.JoinSpectator(this); SendFightJoinInfos(character); }); }