コード例 #1
0
ファイル: ChickenCoop.cs プロジェクト: nydehi/imagine-uo
 protected override void OnTarget(Mobile from, object targeted)
 {
     if (targeted is ChickenLizard)
     {
         m_Post.EndStable(from, (ChickenLizard)targeted);
         from.SendLocalizedMessage(1112559); // Which chicken do you wish to stable?
     }
     else if (targeted is Chicken)
     {
         m_Post.EndStable(from, (Chicken)targeted);
         from.SendLocalizedMessage(1112559); // Which chicken do you wish to stable?
     }
     else if (targeted is BattleChickenLizard)
     {
         m_Post.EndStable(from, (BattleChickenLizard)targeted);
         from.SendLocalizedMessage(1112559); // Which chicken do you wish to stable?
     }
     else if (targeted == from)
     {
         from.SendLocalizedMessage(502672); // HA HA HA! Sorry, I am not an inn.
     }
     else
     {
         from.SendLocalizedMessage(1112558); // You may only stable chickens in the chicken coop.
     }
 }
コード例 #2
0
 protected override void OnTarget(Mobile from, object targeted)
 {
     if (targeted is Chicken || targeted is BattleChickenLizard)
     {
         m_Post.EndStable(from, (BaseCreature)targeted);
     }
     else if (targeted == from)
     {
         from.SendLocalizedMessage(1112558);                     // You may only stable chickens in the chicken coop.
     }
     else
     {
         from.SendLocalizedMessage(1112558);                     // You may only stable chickens in the chicken coop.
     }
 }