CODE |
if ( acqType == FightMode.Evil && !bValid ) { if( m is BaseCreature && ((BaseCreature)m).Controlled && ((BaseCreature)m).ControlMaster != null ) bValid = ( ((BaseCreature)m).ControlMaster.Karma < 0 ); else bValid = ( m.Karma < 0 ); } // ARTEGORDONMOD // attack all uncontrolled, previously tamed pets if (m is BaseCreature && !((BaseCreature)m).Controlled && ((BaseCreature)m).ControlMaster == null && ((BaseCreature)m).Owners != null && ((BaseCreature)m).Owners.Count > 0) { bValid = true; } if ( !bValid ) continue; |
QUOTE |
public virtual bool IsEnemy(Mobile m) { OppositionGroup g = this.OppositionGroup; if (g != null && g.IsEnemy(this, m)) return true; if (m is BaseGuard) return false; if (GetFactionAllegiance(m) == Allegiance.Ally) return false; Ethics.Ethic ourEthic = EthicAllegiance; Ethics.Player pl = Ethics.Player.Find(m, true); if (pl != null && pl.IsShielded && (ourEthic == null || ourEthic == pl.Ethic)) return false; if (!(m is BaseCreature) || m is Server.Engines.Quests.Haven.MilitiaFighter) return true; BaseCreature c = (BaseCreature)m; // ARTEGORDONMOD // attack all uncontrolled, previously tamed pets if (!c.Controlled && c.ControlMaster == null && c.Owners != null && c.Owners.Count > 0) return true; return (m_iTeam != c.m_iTeam || ((m_bSummoned || m_bControlled) != (c.m_bSummoned || c.m_bControlled))/* || c.Combatant == this*/ ); } |
QUOTE |
// ARTEGORDONMOD // test for previously tamed creatures public static bool IsPreviouslyTamed(Mobile m) { if (m is BaseCreature) { BaseCreature c = m as BaseCreature; return (!c.Controlled && c.ControlMaster == null && c.Owners != null && c.Owners.Count > 0); } else return false; } // ARTEGORDONMOD // test for nearby previously tamed creatures public static bool HasNearbyPreviouslyTamed(Mobile m, int iRange) { if (m == null) return false; Map map = m.Map; if (map == null) return false; IPooledEnumerable eable = map.GetMobilesInRange(m.Location, iRange); foreach (Mobile c in eable) { if (IsPreviouslyTamed( c )) return true; } eable.Free(); return false; } public virtual bool IsEnemy(Mobile m) { OppositionGroup g = this.OppositionGroup; if (g != null && g.IsEnemy(this, m)) return true; if (m is BaseGuard) return false; if (GetFactionAllegiance(m) == Allegiance.Ally) return false; Ethics.Ethic ourEthic = EthicAllegiance; Ethics.Player pl = Ethics.Player.Find(m, true); if (pl != null && pl.IsShielded && (ourEthic == null || ourEthic == pl.Ethic)) return false; if (!(m is BaseCreature) || m is Server.Engines.Quests.Haven.MilitiaFighter) return true; BaseCreature c = (BaseCreature)m; // ARTEGORDONMOD // attack all uncontrolled, previously tamed pets if (IsPreviouslyTamed(m)) return true; return (m_iTeam != c.m_iTeam || ((m_bSummoned || m_bControlled) != (c.m_bSummoned || c.m_bControlled))/* || c.Combatant == this*/ ); } |
QUOTE |
if (acqType == FightMode.None) { m_Mobile.FocusMob = null; return false; } // ARTEGORDONMOD // allow non-aggressive creatures to attack previously tamed creatures if (acqType == FightMode.Aggressor && m_Mobile.Aggressors.Count == 0 && m_Mobile.Aggressed.Count == 0 && m_Mobile.FactionAllegiance == null && m_Mobile.EthicAllegiance == null && !BaseCreature.HasNearbyPreviouslyTamed(m_Mobile, iRange)) { m_Mobile.FocusMob = null; return false; } if (m_Mobile.NextReacquireTime > DateTime.Now) { m_Mobile.FocusMob = null; return false; } |
QUOTE |
if (acqType == FightMode.Evil && !bValid) { if (m is BaseCreature && ((BaseCreature)m).Controlled && ((BaseCreature)m).ControlMaster != null) bValid = (((BaseCreature)m).ControlMaster.Karma < 0); else bValid = (m.Karma < 0); } // ARTEGORDONMOD // allow non-aggressive creatures to attack previously tamed creatures if (BaseCreature.IsPreviouslyTamed(m)) bValid = true; if (!bValid) continue; |
QUOTE (Erica @ August 24, 2006 06:04 pm) |
Hmm thats odd i tryed this one as well and only monster attacks what you tamed not the regular animal wont attack. |
CODE |
if( m_Mobile.ConstantFocus != null ) { m_Mobile.DebugSay( "Acquired my constant focus" ); m_Mobile.FocusMob = m_Mobile.ConstantFocus; return true; } if( acqType == FightMode.None ) { m_Mobile.FocusMob = null; return false; } // ARTEGORDONMOD // allow non-aggressive creatures to attack previously tamed creatures // && !BaseCreature.HasNearbyPreviouslyTamed(m_Mobile, iRange) )<--EDIT Part if ( acqType == FightMode.Aggressor && m_Mobile.Aggressors.Count == 0 && m_Mobile.Aggressed.Count == 0 && m_Mobile.FactionAllegiance == null && m_Mobile.EthicAllegiance == null && !BaseCreature.HasNearbyPreviouslyTamed(m_Mobile, iRange) ) { m_Mobile.FocusMob = null; return false; } |
CODE |
public virtual Allegiance GetEthicAllegiance( Mobile mob ) { if ( mob == null || mob.Map != Faction.Facet || EthicAllegiance == null ) return Allegiance.None; Ethics.Ethic ethic = Ethics.Ethic.Find( mob, true ); if ( ethic == null ) return Allegiance.None; return ( ethic == EthicAllegiance ? Allegiance.Ally : Allegiance.Enemy ); } #endregion // ARTEGORDONMOD START // test for previously tamed creatures public static bool IsPreviouslyTamed(Mobile m) { if (m is BaseCreature) { BaseCreature c = m as BaseCreature; return (!c.Controlled && c.ControlMaster == null && c.Owners != null && c.Owners.Count > 0); } else return false; } // ARTEGORDONMOD // test for nearby previously tamed creatures public static bool HasNearbyPreviouslyTamed(Mobile m, int iRange) { if (m == null) return false; Map map = m.Map; if (map == null) return false; IPooledEnumerable eable = map.GetMobilesInRange(m.Location, iRange); foreach (Mobile c in eable) { if (IsPreviouslyTamed( c )) return true; } eable.Free(); return false; } // ARTEGORDONMOD END public virtual bool IsEnemy( Mobile m ) { OppositionGroup g = this.OppositionGroup; |
CODE |
BaseCreature c = (BaseCreature)m; // ARTEGORDONMOD START // attack all uncontrolled, previously tamed pets if (IsPreviouslyTamed(m)) return true; // ARTEGORDONMOD END return ( m_iTeam != c.m_iTeam || ( (m_bSummoned || m_bControlled) != (c.m_bSummoned || c.m_bControlled) )/* || c.Combatant == this*/ ); |