本文整理汇总了C#中Server.Mobiles.BaseCreature.Internalize方法的典型用法代码示例。如果您正苦于以下问题:C# BaseCreature.Internalize方法的具体用法?C# BaseCreature.Internalize怎么用?C# BaseCreature.Internalize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.BaseCreature
的用法示例。
在下文中一共展示了BaseCreature.Internalize方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EndStable
public void EndStable(Mobile from, BaseCreature pet)
{
if (this.Deleted || !from.CheckAlive())
return;
if (!pet.Controlled || pet.ControlMaster != from)
{
from.SendLocalizedMessage(1042562); // You do not own that pet!
}
else if (pet.IsDeadPet)
{
from.SendLocalizedMessage(1049668); // Living pets only, please.
}
else if (pet.Summoned)
{
from.SendLocalizedMessage(502673); // I can not stable summoned creatures.
}
#region Mondain's Legacy
else if (pet.Allured)
{
from.SendLocalizedMessage(1048053); // You can't stable that!
}
#endregion
else if (pet.Body.IsHuman)
{
from.SendLocalizedMessage(502672); // HA HA HA! Sorry, I am not an inn.
}
else if ((pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && pet.Backpack.Items.Count > 0))
{
from.SendLocalizedMessage(1042563); // You need to unload your pet.
}
else if (pet.Combatant != null && pet.InRange(pet.Combatant, 12) && pet.Map == pet.Combatant.Map)
{
from.SendLocalizedMessage(1042564); // I'm sorry. Your pet seems to be busy.
}
else if (from.Stabled.Count >= GetMaxStabled(from))
{
from.SendLocalizedMessage(1042565); // You have too many pets in the stables!
}
else
{
Container bank = from.FindBankNoCreate();
if (bank != null && bank.ConsumeTotal(typeof(Gold), 30))
{
pet.ControlTarget = null;
pet.ControlOrder = OrderType.Stay;
pet.Internalize();
pet.SetControlMaster(null);
pet.SummonMaster = null;
pet.IsStabled = true;
if (Core.SE)
pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully happy
from.Stabled.Add(pet);
this.UsesRemaining -= 1;
from.SendLocalizedMessage(502679); // Very well, thy pet is stabled. Thou mayst recover it by saying 'claim' to me. In one real world week, I shall sell it off if it is not claimed!
}
else
{
from.SendLocalizedMessage(502677); // But thou hast not the funds in thy bank account!
}
}
}
示例2: StablePet
public void StablePet(BaseCreature pet, bool maxloyal, bool autostable)
{
if (pet is IMount)
{
((IMount)pet).Rider = null;
}
pet.ControlTarget = null;
pet.ControlOrder = OrderType.Stay;
pet.Internalize();
pet.SetControlMaster(null);
pet.SummonMaster = null;
pet.IsStabled = true;
pet.StabledDate = DateTime.UtcNow;
Stabled.Add(pet);
if (maxloyal)
{
pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully happy
}
if (autostable)
{
AutoStabled.Add(pet);
}
}
示例3: EndStable
public void EndStable( Mobile from, BaseCreature pet )
{
if ( Deleted || !from.CheckAlive() )
return;
if ( !pet.Controlled || pet.ControlMaster != from )
{
Say( 1042562 ); // You do not own that pet!
}
else if ( pet.IsDeadPet )
{
Say( 1049668 ); // Living pets only, please.
}
else if ( pet.Summoned )
{
Say( 502673 ); // I can not stable summoned creatures.
}
else if ( pet.Body.IsHuman )
{
Say( 502672 ); // HA HA HA! Sorry, I am not an inn.
}
else if ( (pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && pet.Backpack.Items.Count > 0) )
{
Say( 1042563 ); // You need to unload your pet.
}
else if ( pet.Combatant != null && pet.InRange( pet.Combatant, 12 ) && pet.Map == pet.Combatant.Map )
{
Say( 1042564 ); // I'm sorry. Your pet seems to be busy.
}
else if ( from.Stabled.Count >= GetMaxStabled( from ) )
{
Say( 1042565 ); // You have too many pets in the stables!
}
else
{
if ( Banker.Withdraw( from, 30 ) )
{
if ( m_Sign != null )
m_Sign.Stone.CityTreasury += 30;
pet.ControlTarget = null;
pet.ControlOrder = OrderType.Stay;
pet.Internalize();
pet.SetControlMaster( null );
pet.SummonMaster = null;
pet.IsStabled = true;
from.Stabled.Add( pet );
Say( 502679 ); // Very well, thy pet is stabled. Thou mayst recover it by saying 'claim' to me. In one real world week, I shall sell it off if it is not claimed!
}
else
{
Say( 502677 ); // But thou hast not the funds in thy bank account!
}
}
}
示例4: StablePet
public static void StablePet(Mobile from, BaseCreature pet)
{
if (pet == null || pet.Deleted || from == null || from.Deleted)
{
return;
}
if (pet.ControlMaster == null)
{
from.SendMessage("This creature has no owner.");
}
else if (pet.IsStabled)
{
from.SendMessage("The pet is already stabled.");
}
else
{
Mobile owner = pet.ControlMaster;
if (owner.Stabled.Count >= AnimalTrainer.GetMaxStabled(owner))
{
from.SendMessage("Warning: The owner has not enough free stable slots. Forcing GM stable...");
}
if (pet is IMount)
{
var bm = (IMount) pet;
bm.Rider = null;
}
pet.ControlTarget = null;
pet.ControlOrder = OrderType.Stay;
pet.Internalize();
pet.SetControlMaster(null);
pet.SummonMaster = null;
pet.IsStabled = true;
pet.StabledDate = DateTime.UtcNow;
owner.Stabled.Add(pet);
from.SendMessage("The pet is now stabled.");
}
}
示例5: EndStable
public void EndStable(Mobile from, BaseCreature pet)
{
if (Deleted || !from.CheckAlive())
{
return;
}
if (pet.Body.IsHuman)
{
SayTo(from, 502672); // HA HA HA! Sorry, I am not an inn.
}
else if (!pet.Controlled)
{
SayTo(from, 1048053); // You can't stable that!
}
else if (pet.ControlMaster != from)
{
SayTo(from, 1042562); // You do not own that pet!
}
else if (pet.IsDeadPet)
{
SayTo(from, 1049668); // Living pets only, please.
}
else if (pet.Summoned)
{
SayTo(from, 502673); // I can not stable summoned creatures.
}
else if (pet.Allured)
{
SayTo(from, 1048053); // You can't stable that!
}
else if ((pet is PackLlama || pet is PackHorse || pet is Beetle) &&
(pet.Backpack != null && pet.Backpack.Items.Count > 0))
{
SayTo(from, 1042563); // You need to unload your pet.
}
else if (pet.Combatant != null && pet.InRange(pet.Combatant, 12) && pet.Map == pet.Combatant.Map)
{
SayTo(from, 1042564); // I'm sorry. Your pet seems to be busy.
}
else if (from.Stabled.Count >= GetMaxStabled(from))
{
SayTo(from, 1042565); // You have too many pets in the stables!
}
else if ((from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Gold), 30)) || Banker.Withdraw(from, 30))
{
pet.ControlTarget = null;
pet.ControlOrder = OrderType.Stay;
pet.Internalize();
pet.SetControlMaster(null);
pet.SummonMaster = null;
pet.IsStabled = true;
pet.StabledBy = from;
if (Core.SE)
{
pet.Loyalty = MaxLoyalty; // Wonderfully happy
}
from.Stabled.Add(pet);
SayTo(from, Core.AOS ? 1049677 : 502679);
// [AOS: Your pet has been stabled.] Very well, thy pet is stabled.
// Thou mayst recover it by saying 'claim' to me. In one real world week,
// I shall sell it off if it is not claimed!
}
else
{
SayTo(from, 502677); // But thou hast not the funds in thy bank account!
}
}