public override void OnQuit() { CL.Out(LogFilter.PLAYER, "Player {0} OnQuit()".f(name)); //remove from group if in group //this.GroupController().OnExitGame(GameApplication.PlayerGroups); mTarget.Clear(); mAI.SetControlState(PlayerState.Idle); base.OnQuit(); //PlayerCharacter ch = new PlayerCharacter { CharacterId = mCharacter.characterId, Exp = mCharacter.exp, Model = mShip.shipModel.ModelHash(), Name = name, Race = mRace.race, Workshop = mCharacter.workshop }; //application.MasterUpdateCharacter(nebulaObject.Id, mCharacter.characterId, ch, ch.Model, (nebulaObject.world as MmoWorld).Name, ch.Exp); UpdateCharacterOnMaster(); }
private bool ValidateTarget() { var targetCharacter = mTarget.targetObject.GetComponent <CharacterObject>(); if (!targetCharacter) { mTarget.Clear(); return(false); } if ((mCharacter.RelationTo(targetCharacter) != FractionRelation.Enemy) && (mCharacter.RelationTo(targetCharacter) != FractionRelation.Neutral)) { mTarget.Clear(); return(false); } return(true); }