{"action":"created","issue":{"url":"https://api.github.com/repos/scriptdev2/scriptdev2/issues/169","labels_url":"https://api.github.com/repos/scriptdev2/scriptdev2/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/scriptdev2/scriptdev2/issues/169/comments","events_url":"https://api.github.com/repos/scriptdev2/scriptdev2/issues/169/events","html_url":"https://github.com/scriptdev2/scriptdev2/issues/169","id":82620801,"number":169,"title":"The Sleeper has Awakened across all cores.","user":{"login":"scotty0100","id":4440226,"avatar_url":"https://avatars.githubusercontent.com/u/4440226?v=3","gravatar_id":"","url":"https://api.github.com/users/scotty0100","html_url":"https://github.com/scotty0100","followers_url":"https://api.github.com/users/scotty0100/followers","following_url":"https://api.github.com/users/scotty0100/following{/other_user}","gists_url":"https://api.github.com/users/scotty0100/gists{/gist_id}","starred_url":"https://api.github.com/users/scotty0100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scotty0100/subscriptions","organizations_url":"https://api.github.com/users/scotty0100/orgs","repos_url":"https://api.github.com/users/scotty0100/repos","events_url":"https://api.github.com/users/scotty0100/events{/privacy}","received_events_url":"https://api.github.com/users/scotty0100/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-29T23:01:50Z","updated_at":"2015-11-02T20:51:28Z","closed_at":null,"body":"Kerlonian Evershade (ID: 11218) is using the wrong model of bear form when you are not on the quest, he should be sleeping in the model of the druid class bear form (currently he has a normal bear model).\r\n\r\nI believe the model ID is 2281.\r\n\r\nAfter you start the quest he should shapeshift into his normal form and stay like that until reaching to the end of the destination of the quest.\r\nhttp://s.cdn.wowinterface.com/preview/pvw28517.jpg\r\nhttp://old.wowdata.ru/data/userimg/3/3077.jpg\r\n\r\nWhen you wake him up using the Horn of Awakening (ID: 13536) a voice sound should be played saying \"I'm awake, I'm awake\" or \"The sleeper has awakened!\" and written so in the chat too.\r\n\r\nThere should be 2 scripted encounters while moving on the road (only on the road). one encounter is with 3 furbolgs, the other is with 2 undead (Forsaken Scout).\r\n\r\nTagging @cala just in case the scripted road events could possibly be done via DB :)"},"comment":{"url":"https://api.github.com/repos/scriptdev2/scriptdev2/issues/comments/153153023","html_url":"https://github.com/scriptdev2/scriptdev2/issues/169#issuecomment-153153023","issue_url":"https://api.github.com/repos/scriptdev2/scriptdev2/issues/169","id":153153023,"user":{"login":"xfurry","id":172444,"avatar_url":"https://avatars.githubusercontent.com/u/172444?v=3","gravatar_id":"","url":"https://api.github.com/users/xfurry","html_url":"https://github.com/xfurry","followers_url":"https://api.github.com/users/xfurry/followers","following_url":"https://api.github.com/users/xfurry/following{/other_user}","gists_url":"https://api.github.com/users/xfurry/gists{/gist_id}","starred_url":"https://api.github.com/users/xfurry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfurry/subscriptions","organizations_url":"https://api.github.com/users/xfurry/orgs","repos_url":"https://api.github.com/users/xfurry/repos","events_url":"https://api.github.com/users/xfurry/events{/privacy}","received_events_url":"https://api.github.com/users/xfurry/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T20:51:28Z","updated_at":"2015-11-02T20:51:28Z","body":"Does this patch help?\r\nI know that the road events are not scripted, but this should help with the model on evade.\r\n\r\n```sql\r\nDELETE FROM creature_template_addon WHERE entry=11218;\r\nINSERT INTO creature_template_addon VALUES\r\n(11218, 0, 3, 1, 1, 0, 0, '');\r\n```\r\n\r\n```diff\r\ndiff --git a/src/scriptdev2/scripts/kalimdor/darkshore.cpp b/src/scriptdev2/scripts/kalimdor/darkshore.cpp\r\nindex f5507fc..7bab514 100644\r\n--- a/src/scriptdev2/scripts/kalimdor/darkshore.cpp\r\n+++ b/src/scriptdev2/scripts/kalimdor/darkshore.cpp\r\n@@ -58,16 +58,23 @@ enum\r\n \r\n     SAY_KER_END                 = -1000444,\r\n \r\n+    SPELL_BEAR_FORM             = 18309,\r\n     SPELL_SLEEP_VISUAL          = 25148,\r\n     SPELL_AWAKEN                = 17536,\r\n+\r\n     QUEST_SLEEPER_AWAKENED      = 5321,\r\n+\r\n     NPC_LILADRIS                = 11219                     // attackers entries unknown\r\n };\r\n \r\n // TODO: make concept similar as \"ringo\" -escort. Find a way to run the scripted attacks, _if_ player are choosing road.\r\n struct npc_kerlonianAI : public FollowerAI\r\n {\r\n-    npc_kerlonianAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); }\r\n+    npc_kerlonianAI(Creature* pCreature) : FollowerAI(pCreature)\r\n+    {\r\n+        DoCastSpellIfCan(m_creature, SPELL_BEAR_FORM);\r\n+        Reset();\r\n+    }\r\n \r\n     uint32 m_uiFallAsleepTimer;\r\n \r\n@@ -97,12 +104,16 @@ struct npc_kerlonianAI : public FollowerAI\r\n         }\r\n     }\r\n \r\n-    void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override\r\n+    void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override\r\n     {\r\n-        if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_AWAKEN)\r\n-            ClearSleeping();\r\n+        if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER)\r\n+        {\r\n+            if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED))\r\n+                ClearSleeping();\r\n+        }\r\n     }\r\n \r\n+    // Function to set npc to sleep mode\r\n     void SetSleeping()\r\n     {\r\n         SetFollowPaused(true);\r\n@@ -122,10 +133,11 @@ struct npc_kerlonianAI : public FollowerAI\r\n             case 3: DoScriptText(SAY_KER_SLEEP_4, m_creature); break;\r\n         }\r\n \r\n-        m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);\r\n-        m_creature->CastSpell(m_creature, SPELL_SLEEP_VISUAL, false);\r\n+        if (DoCastSpellIfCan(m_creature, SPELL_SLEEP_VISUAL) == CAST_OK)\r\n+            m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);\r\n     }\r\n \r\n+    // Function to clear sleep mode\r\n     void ClearSleeping()\r\n     {\r\n         m_creature->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL);\r\n@@ -172,6 +184,7 @@ bool QuestAccept_npc_kerlonian(Player* pPlayer, Creature* pCreature, const Quest\r\n     {\r\n         if (npc_kerlonianAI* pKerlonianAI = dynamic_cast<npc_kerlonianAI*>(pCreature->AI()))\r\n         {\r\n+            pCreature->RemoveAurasDueToSpell(SPELL_BEAR_FORM);\r\n             pCreature->SetStandState(UNIT_STAND_STATE_STAND);\r\n             DoScriptText(SAY_KER_START, pCreature, pPlayer);\r\n             pKerlonianAI->StartFollow(pPlayer, FACTION_ESCORT_N_FRIEND_PASSIVE, pQuest);\r\n@@ -181,6 +194,17 @@ bool QuestAccept_npc_kerlonian(Player* pPlayer, Creature* pCreature, const Quest\r\n     return true;\r\n }\r\n \r\n+bool EffectDummyCreature_awaken_kerlonian(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/)\r\n+{\r\n+    if (uiSpellId == SPELL_AWAKEN && uiEffIndex == EFFECT_INDEX_0)\r\n+    {\r\n+        pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget);\r\n+        return true;\r\n+    }\r\n+\r\n+    return false;\r\n+}\r\n+\r\n /*####\r\n # npc_prospector_remtravel\r\n ####*/\r\n@@ -748,6 +772,7 @@ void AddSC_darkshore()\r\n     pNewScript->Name = \"npc_kerlonian\";\r\n     pNewScript->GetAI = &GetAI_npc_kerlonian;\r\n     pNewScript->pQuestAcceptNPC = &QuestAccept_npc_kerlonian;\r\n+    pNewScript->pEffectDummyNPC = &EffectDummyCreature_awaken_kerlonian;\r\n     pNewScript->RegisterSelf();\r\n \r\n     pNewScript = new Script;\r\n```"}}