本文整理汇总了C#中Server.Mobiles.BaseCreature类的典型用法代码示例。如果您正苦于以下问题:C# BaseCreature类的具体用法?C# BaseCreature怎么用?C# BaseCreature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseCreature类属于Server.Mobiles命名空间,在下文中一共展示了BaseCreature类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BaseAI
public BaseAI(BaseCreature m)
{
m_Mobile = m;
m_Timer = new AITimer(this);
bool activate;
if (!m.PlayerRangeSensitive)
{
activate = true;
}
else if (World.Loading)
{
activate = false;
}
else if (m.Map == null || m.Map == Map.Internal || !m.Map.GetSector(m).Active)
{
activate = false;
}
else
{
activate = true;
}
if (activate)
{
m_Timer.Start();
}
Action = ActionType.Wander;
}
示例2: Scale
public static void Scale(BaseCreature bc, double scalar, bool scaleStats)
{
if (scaleStats)
{
if (bc.RawStr > 0)
bc.RawStr = (int)Math.Max(1, bc.RawStr * scalar);
if (bc.RawDex > 0)
bc.RawDex = (int)Math.Max(1, bc.RawDex * scalar);
if (bc.HitsMaxSeed > 0)
{
bc.HitsMaxSeed = (int)Math.Max(1, bc.HitsMaxSeed * scalar);
bc.Hits = bc.Hits;
}
if (bc.StamMaxSeed > 0)
{
bc.StamMaxSeed = (int)Math.Max(1, bc.StamMaxSeed * scalar);
bc.Stam = bc.Stam;
}
}
for (int i = 0; i < bc.Skills.Length; ++i)
bc.Skills[i].Base *= scalar;
}
示例3: RandomFarmableItems
public RandomFarmableItems(BaseCreature creature)
: base(creature, EnumChance.Normal)
{
this.AddSortableItem(new Cotton(3));
this.AddSortableItem(new Flax(3));
this.AddSortableItem(new WheatSheaf(3));
}
示例4: CreatureDamagedEventArgs
public CreatureDamagedEventArgs( BaseCreature bc, int amount, Mobile from, bool willKill )
{
Aggressor = from;
Creature = bc;
DamageAmount = amount;
WillKill = willKill;
}
示例5: OnKill
public override void OnKill( BaseCreature creature, Container corpse )
{
if ( creature is CursedSoul )
{
if ( m_CursedSoulsKilled == 0 )
System.AddConversation( new GainKarmaConversation( true ) );
m_CursedSoulsKilled++;
// Cursed Souls killed: ~1_COUNT~
System.From.SendLocalizedMessage( 1063038, m_CursedSoulsKilled.ToString() );
}
else if ( creature is YoungRonin )
{
if ( m_YoungRoninKilled == 0 )
System.AddConversation( new GainKarmaConversation( false ) );
m_YoungRoninKilled++;
// Young Ronin killed: ~1_COUNT~
System.From.SendLocalizedMessage( 1063039, m_YoungRoninKilled.ToString() );
}
CurProgress = Math.Max( m_CursedSoulsKilled, m_YoungRoninKilled );
}
示例6: RunFly
public static void RunFly( BaseCreature fbc )
{
if ( NullCheck( fbc ))
return;
fbc.Direction |= Direction.Running;
}
示例7: IsFireBreathingCreature
private static bool IsFireBreathingCreature(BaseCreature bc)
{
if (bc == null)
return false;
return bc.HasBreath;
}
示例8: CombineBackpacks
public static void CombineBackpacks( BaseCreature animal )
{
if ( Core.AOS )
return;
//if ( animal.IsBonded || animal.IsDeadPet )
// return;
Container pack = animal.Backpack;
if ( pack != null )
{
Container newPack = new Backpack();
for ( int i = pack.Items.Count - 1; i >= 0; --i )
{
if ( i >= pack.Items.Count )
continue;
newPack.DropItem( pack.Items[i] );
}
pack.DropItem( newPack );
}
}
示例9: CharmedMobile
public CharmedMobile(BaseCreature owner)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
owner = m_Owner;
Body = 777;
Title = " The Mystic Lama Herder";
}
示例10: PetResurrectGump
public PetResurrectGump(Mobile from, BaseCreature pet, double hitsScalar) : base(50, 50)
{
from.CloseGump(typeof (PetResurrectGump));
m_Pet = pet;
m_HitsScalar = hitsScalar;
AddPage(0);
AddBackground(10, 10, 265, 140, 0x242C);
AddItem(205, 40, 0x4);
AddItem(227, 40, 0x5);
AddItem(180, 78, 0xCAE);
AddItem(195, 90, 0xCAD);
AddItem(218, 95, 0xCB0);
AddHtmlLocalized(30, 30, 150, 75, 1049665, false, false);
// <div align=center>Wilt thou sanctify the resurrection of:</div>
AddHtml(30, 70, 150, 25, String.Format("<div align=CENTER>{0}</div>", pet.Name), true, false);
AddButton(40, 105, 0x81A, 0x81B, 0x1, GumpButtonType.Reply, 0); // Okay
AddButton(110, 105, 0x819, 0x818, 0x2, GumpButtonType.Reply, 0); // Cancel
}
示例11: UnsummonTimer
public UnsummonTimer(Mobile caster, BaseCreature creature, TimeSpan delay)
: base(delay)
{
this.m_Caster = caster;
this.m_Creature = creature;
this.Priority = TimerPriority.OneSecond;
}
示例12: Check
private static void Check(Mobile from, BaseCreature c, double min)
{
if (from.CheckTargetSkill(SkillName.AnimalLore, c, min, 120.0))
SendGump(from, c);
else
from.SendLocalizedMessage(500334); // You can't think of anything you know offhand.
}
示例13: CouncilMemberAI
public CouncilMemberAI(BaseCreature m)
: base(m)
{
DmgSlowsMovement = false;
CanRun = false;
UsesPotions = false; //CanDrinkPots = false;
}
示例14: TokenTest
public static void TokenTest(Mobile m, BaseCreature bc)
{
if ( m.Backpack == null )
return;
int karma = Math.Abs( bc.Karma );
int tokenbase = ( bc.TotalGold + karma + bc.Fame + ((bc.Hits+bc.Stam+bc.Mana)/3)) / 6000;
int maxtokens = 6 + ( 100 * tokenbase );
int mintokens = TokenSettings.Loot_Difference*(maxtokens/100);
int tokenstogive = Utility.Random( mintokens, maxtokens );
bool tokensgiven = false;
foreach( Item i in m.Backpack.Items )
{
if( i is TokenBag && !tokensgiven)
{
Tokens t = new Tokens( tokenstogive );
if ( ((Container)i).TryDropItem( m, t, true ) )
{
m.SendMessage( "You have received {0} tokens", tokenstogive );
tokensgiven = true;
}
else
t.Delete();
}
if ( tokensgiven )
break;
}
}
示例15: KillEntry
/// <summary>
/// Represents an entry in the killTable
/// pkKillEntryID, fkMonsterEntryID, PlayersKilled, PlayerCount, BSCount, EVcount
/// </summary>
/// <param name="creatureKilled"></param>
/// <param name="damageEntries"></param>
/// <param name="mobilesKilled"></param>
/// <param name="lootItems"></param>
public KillEntry(BaseCreature creatureKilled, IList<DamageEntry> damageEntries, Dictionary<Mobile, int> mobilesKilled, IList<Item> lootItems)
{
m_CreatureKilled = creatureKilled;
m_KillTime = m_CreatureKilled.KillDuration;
//Used to determine if a killer has accoured
List<Mobile> monsterKillerList = GetKillerList(damageEntries);
SetKillerTypes(monsterKillerList);
SetPlayersDied(mobilesKilled, monsterKillerList);
//Initialize the list and add the gold entry to it
m_DatabaseEntries = new List<DatabaseEntry>(lootItems.Count + 1) { new GoldValueEntry(lootItems) };
//Loop through the remaining items (gold and stones excluded) and add them to the DatabaseEntry list
for (int i = 0; i < lootItems.Count; i++)
{
Item item = lootItems[i];
if (item is BaseWeapon)
m_DatabaseEntries.Add(new WeaponEntry((BaseWeapon)item));
else if (item is BaseArmor)
m_DatabaseEntries.Add(new ArmorEntry((BaseArmor)item));
else
m_DatabaseEntries.Add(new ItemEntry(item));
}
}