public DuelRegion(DuelController dc) : base(String.Format("DuelRegion{0}", Count.ToString()), dc.ThisRegionMap, 100, dc.ThisRegionPoint) { Controller = dc; this.Register(); Count += 1; }
void Start() { m_DuelController = GameObject.FindGameObjectWithTag("GameController") .GetComponent <DuelController>(); m_Player = GameObject.FindGameObjectWithTag("Player") .GetComponent <PlayerCharacter>(); m_ShadowController = GetComponent <ShadowController>(); m_DamageColor = m_SpriteColor; }
void Awake() { if (control == null) { control = this; } else if (control != this) { Destroy(gameObject); } }
// Awake void Start() { m_HasSword = true; m_DuelController = GameObject.FindGameObjectWithTag("GameController") .GetComponent <DuelController> (); m_GroundCheck = transform.Find("GroundCheck"); m_DamageColor = new Color(1f, 0.3f, 0.24f); m_LayerMask = -1; m_WalkGroundCheck = m_GroundCheck.localPosition; m_Animator.runtimeAnimatorController = Resources.Load( Constants.ANIM_WALK) as RuntimeAnimatorController; throwAnimDuration = .25f; }
public static int MobileNotoriety(Mobile source, Mobile target) { if (source is PlayerMobile && target is PlayerMobile) { if (Duel_Config.InADuel((PlayerMobile)source) && Duel_Config.InADuel((PlayerMobile)target)) { return(DuelController.NotoHandler(source, target)); } } if (Core.AOS && (target.Blessed || (target is BaseVendor && ((BaseVendor)target).IsInvulnerable) || target is PlayerVendor || target is TownCrier)) { return(Notoriety.Invulnerable); } if (target.AccessLevel > AccessLevel.Player) { return(Notoriety.CanBeAttacked); } if (source.Player && !target.Player && source is PlayerMobile && target is BaseCreature) { BaseCreature bc = (BaseCreature)target; Mobile master = bc.GetMaster(); if (master != null && master.AccessLevel > AccessLevel.Player) { return(Notoriety.CanBeAttacked); } master = bc.ControlMaster; if (Core.ML && master != null) { if ((source == master && CheckAggressor(target.Aggressors, source)) || (CheckAggressor(source.Aggressors, bc))) { return(Notoriety.CanBeAttacked); } else { return(MobileNotoriety(source, master)); } } if (!bc.Summoned && !bc.Controlled && ((PlayerMobile)source).EnemyOfOneType == target.GetType()) { return(Notoriety.Enemy); } } if (target.Kills >= 5 || (target.Body.IsMonster && IsSummoned(target as BaseCreature) && !(target is BaseFamiliar) && !(target is ArcaneFey) && !(target is Golem)) || (target is BaseCreature && (((BaseCreature)target).AlwaysMurderer || ((BaseCreature)target).IsAnimatedDead))) { return(Notoriety.Murderer); } if (target.Criminal) { return(Notoriety.Criminal); } Guild sourceGuild = GetGuildFor(source.Guild as Guild, source); Guild targetGuild = GetGuildFor(target.Guild as Guild, target); if (sourceGuild != null && targetGuild != null) { if (sourceGuild == targetGuild || sourceGuild.IsAlly(targetGuild)) { return(Notoriety.Ally); } else if (sourceGuild.IsEnemy(targetGuild)) { return(Notoriety.Enemy); } } Faction srcFaction = Faction.Find(source, true, true); Faction trgFaction = Faction.Find(target, true, true); if (srcFaction != null && trgFaction != null && srcFaction != trgFaction && source.Map == Faction.Facet) { return(Notoriety.Enemy); } if (SkillHandlers.Stealing.ClassicMode && target is PlayerMobile && ((PlayerMobile)target).PermaFlags.Contains(source)) { return(Notoriety.CanBeAttacked); } if (target is BaseCreature && ((BaseCreature)target).AlwaysAttackable) { return(Notoriety.CanBeAttacked); } if (CheckHouseFlag(source, target, target.Location, target.Map)) { return(Notoriety.CanBeAttacked); } if (!(target is BaseCreature && ((BaseCreature)target).InitialInnocent)) //If Target is NOT A baseCreature, OR it's a BC and the BC is initial innocent... { if (!target.Body.IsHuman && !target.Body.IsGhost && !IsPet(target as BaseCreature) && !(target is PlayerMobile) || !Core.ML && !target.CanBeginAction(typeof(Server.Spells.Seventh.PolymorphSpell))) { return(Notoriety.CanBeAttacked); } } if (CheckAggressor(source.Aggressors, target)) { return(Notoriety.CanBeAttacked); } if (CheckAggressed(source.Aggressed, target)) { return(Notoriety.CanBeAttacked); } if (target is BaseCreature) { BaseCreature bc = (BaseCreature)target; if (bc.Controlled && bc.ControlOrder == OrderType.Guard && bc.ControlTarget == source) { return(Notoriety.CanBeAttacked); } } if (source is BaseCreature) { BaseCreature bc = (BaseCreature)source; Mobile master = bc.GetMaster(); if (master != null) { if (CheckAggressor(master.Aggressors, target) || MobileNotoriety(master, target) == Notoriety.CanBeAttacked) { return(Notoriety.CanBeAttacked); } } } return(Notoriety.Innocent); }
private void Awake() { _instance = this; }