예제 #1
0
 public override bool OnGossipSelect(Player player, GameObject go, uint sender, uint action)
 {
     player.PlayerTalkClass.ClearMenus();
     if (action == eTradeskill.GossipActionInfoDef + 1)
     {
         player.CLOSE_GOSSIP_MENU();
         Creature target = ScriptedAI.GetClosestCreatureWithEntry(player, GameobjectConst.NpcOuthouseBunny, 3.0f);
         if (target)
         {
             target.GetAI().SetData(1, (uint)player.GetGender());
             go.CastSpell(target, GameobjectConst.SpellIndisposedIii);
         }
         go.CastSpell(player, GameobjectConst.SpellIndisposed);
         if (player.HasItemCount(GameobjectConst.ItemAnderholsSliderCider))
         {
             go.CastSpell(player, GameobjectConst.SpellCreateAmberseeds);
         }
         return(true);
     }
     else
     {
         player.CLOSE_GOSSIP_MENU();
         player.GetSession().SendNotification(GameobjectConst.GoAnderholsSliderCiderNotFound);
         return(false);
     }
 }
예제 #2
0
        public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
        {
            uint action = player.PlayerTalkClass.GetGossipOptionAction(gossipListId);

            player.ClearGossipMenu();
            if (action == eTradeskill.GossipActionInfoDef + 1)
            {
                player.CloseGossipMenu();
                Creature target = ScriptedAI.GetClosestCreatureWithEntry(player, CreatureIds.OuthouseBunny, 3.0f);
                if (target)
                {
                    target.GetAI().SetData(1, (uint)player.GetNativeGender());
                    me.CastSpell(target, SpellIds.IndisposedIii);
                }
                me.CastSpell(player, SpellIds.Indisposed);
                if (player.HasItemCount(ItemIds.AnderholsSliderCider))
                {
                    me.CastSpell(player, SpellIds.CreateAmberseeds);
                }
                return(true);
            }
            else
            {
                player.CloseGossipMenu();
                player.GetSession().SendNotification(GossipConst.AnderholsSliderCiderNotFound);
                return(false);
            }
        }
예제 #3
0
 public void DeadEvent()
 {
     died = true;
     for (int i = 0; i < spellList.Length; i++)
     {
         if (spellList[i] != null)
         {
             Destroy(spellList[i].gameObject);//자신의 스펠 삭제
         }
     }
     for (int i = 0; i < Land.allLand.Count; i++)
     {
         if (Land.allLand[i].LandUnit != null)
         {
             ScriptedAI targetAI = Land.allLand[i].LandUnit.gameObject.GetComponent <ScriptedAI>();
             if (targetAI)
             {
                 targetAI.DeleteThreatTarget(this);
             }
         }
     }
     if (diedEvent != null)
     {
         diedEvent();//죽었을때 이벤트발생(몬스터같은경우 던전스테이지갱신등)
     }
     Destroy(gameObject);
 }
예제 #4
0
        public override bool OnGossipHello(Player player, GameObject go)
        {
            Creature creature = ScriptedAI.GetClosestCreatureWithEntry(go, CreatureIds.Muglash, SharedConst.InteractionDistance * 2);

            if (creature)
            {
                npc_muglash pEscortAI = creature.GetAI <npc_muglash>();
                if (pEscortAI != null)
                {
                    creature.GetAI().Talk(TextIds.SayMugBrazierWait);

                    pEscortAI._isBrazierExtinguished = true;
                    return(false);
                }
            }

            return(true);
        }
예제 #5
0
 private void MobMovement_OnInitialize()
 {
     _scriptedAI = _parent.RequiredComponent <ScriptedAI>();
 }
예제 #6
0
 private void MobMovement_OnDestroy()
 {
     _entry      = null;
     _scriptedAI = null;
 }