WOW와우 분류
WoW script-escort 예제 주석
컨텐츠 정보
- 70 조회
- 0 추천
- 0 비추천
- 목록
본문
트리니티는 호위퀘스트를 smartAI를 사용해서 DB에서 제어 가능 합니다.
smartAI는 정말 탁월하지요. 그걸 트리니티에서 제대로 구현하는데 1년 이상 걸린 것 같던데
필드 퀘스트의 대부분을 DB에서 구현 할 수 있을 정도로 좋아요.
고로 망고스용이 되겠군요. 여하튼 script쪽에 주석과 약간의 설명을
부과해서 알아먹기 쉽게 해놓았습니다. 나중에 뭔가 만들때 조각내서 사용하면 되겠습니다.
/* Copyright (C) 2006 - 2012 ScriptDev2 <http://www.scriptdev2.com/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Example_Escort
SD%Complete: 100
SDComment: Script used for testing escortAI
SDCategory: Script Examples
EndScriptData */
#include "precompiled.h"
#include "escort_ai.h"
//사용될 것들을 enum을 사용해 한 번에 나열해 줍니다.
enum
{
NPC_FELBOAR = 21878,
SPELL_DEATH_COIL = 33130,
SPELL_ELIXIR_OF_FORTITUDE = 3593,
SPELL_BLUE_FIREWORK = 11540,
SAY_AGGRO1 = -1999910,
SAY_AGGRO2 = -1999911,
SAY_WP_1 = -1999912,
SAY_WP_2 = -1999913,
SAY_WP_3 = -1999914,
SAY_WP_4 = -1999915,
SAY_DEATH_1 = -1999916,
SAY_DEATH_2 = -1999917,
SAY_DEATH_3 = -1999918,
SAY_SPELL = -1999919,
SAY_RAND_1 = -1999920,
SAY_RAND_2 = -1999921
};
/*여기서 사용되는 가쉽 아이템이라는 것은 에스코트중에 npc가 뛰거나, 걷는것을 조율 하는 걸로 생각됩니다.
테스트 해보지 않아서 잘 모르겠군요.망나니 탈곡기 보고 있는데, 그냥 가쉽 메뉴인가 보군요.*/
#define GOSSIP_ITEM_1 "Click to Test Escort(Attack, Run)"
#define GOSSIP_ITEM_2 "Click to Test Escort(NoAttack, Walk)"
#define GOSSIP_ITEM_3 "Click to Test Escort(NoAttack, Run)"
//에스코트 도중에 발생하는 모든 것이 작동되도록 스크립된 부분입니다.
struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI
// CreatureAI functions
//에스코트AI를 가지도록 지정하는 겁니다.
example_escortAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); }
uint32 m_uiDeathCoilTimer;
uint32 m_uiChatTimer;
// Is called after each combat, so usally only reset combat-stuff here
/*리턴이 아니니까, void로 지정합니다. 뭐, 당연한 예긴가...매 전투후에 다시 불러 들입니다 이 말은 전투 소물을
가리키는 것으로 보입니다. 아마 에스코트 중에 눈으로 보이는 스펠이 아니라 보이지 않는 가운데, 작동 되는 것일 수도
있겠다 싶군요. DB 로 짠다면 일일이 재소환해 줘야 하는 걸 자동으로 처리 되는 걸로 생각 됩니다.
예제 형식을 보니까, 데스코일이라는 것을 사용해서 뭔가 하는 거 처럼 보입니다. 이 게임에서 코일이라는
것은 대게 특정 이벤트를 유도하기 위한 조건부로 사용되고, 특정 스펠이 작동 됐을 경우 비주얼 효과를 주는 것이며, 트리거 효과를 내기 위해서라고 알고 있지만 이 예제의 내용물은 정확히 알 수 없군요.
가령 시간의 동굴에서 처럼 차원의 문을 열고 시간의 경과에 따라 채팅을 한다던가, 그런 걸로 예상 됩니다
그렇지만 여기서 사용되는 chattimer는 대화를 위한 것이 아닐꺼라 예상 합니다.
지옥 멧돼지가 소환되서 에스코트를 공격한다는 건가. 이런 퀘스트가 있었던가...단순 예제로 판단 됩니다.*/
void Reset()
{
m_uiDeathCoilTimer = 4000;
m_uiChatTimer = 4000;
}
void JustSummoned(Creature* pSummoned)
{
pSummoned->AI()->AttackStart(m_creature);
}
// Pure Virtual Functions (Have to be implemented)
/*이 부분에서 순수 aI을 사용할 거랍니다. 구현되어 있어야 한다는 군요. 기본적인 ai 기능은 대게 구현되 있을 걸로 예상 됩니다. 그렇지 않을 경우 작동되지 않을 수 있다 정도의 경고문이 되겟군요. 이 부분에서 설정하는 것은 웨이포인트 마다 지정된 행위를 하도록 설정하는 곳입니다. enum에 적었던 wp포인트 마다 대사를 읊조리도록 조정하는 내용도 포함 됐군요.웨이포인트2 번에서 지옥멧돼지가 소환되는 장소를 설정하고 사라지는 시간도 설정 됐습니다.*/
void WaypointReached(uint32 uiWP)
{
switch (uiWP)
{
case 1:
DoScriptText(SAY_WP_1, m_creature);
break;
case 3:
DoScriptText(SAY_WP_2, m_creature);
m_creature->SummonCreature(NPC_FELBOAR, m_creature->GetPositionX()+5.0f, m_creature->GetPositionY()+7.0f, m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
break;
case 4:
if (Player* pTmpPlayer = GetPlayerForEscort())
{
//pTmpPlayer is the target of the text
DoScriptText(SAY_WP_3, m_creature, pTmpPlayer);
//pTmpPlayer is the source of the text
DoScriptText(SAY_WP_4, pTmpPlayer);
}
break;
}
}
//에스코트 도중에 어그로를 가졌을 때 행위를 설정하는 곳입니다. 에스코트 중일 때 라고 내용을 한정 시켜놓았군요.
void Aggro(Unit* pWho)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (Player* pTemp = GetPlayerForEscort())
DoScriptText(SAY_AGGRO1, m_creature, pTemp);
}
else
DoScriptText(SAY_AGGRO2, m_creature);
}
// Only overwrite if there is something special
/*특별한 무엇인가가 작동되는 요건 이 있었다고 해도, 그 위에 덮어 씌우고 이걸 작동 되도록 합니다. 에스코트 크리쳐가 죽었을 때를 가정하는 거니까 당연한 거지요.*/
void JustDied(Unit* pKiller)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (Player* pTemp = GetPlayerForEscort())
{
// not a likely case, code here for the sake of example
//이러한 경우만 지칭하는 코드가 아나라 예제를 위해서 있는 거라고?
if (pKiller == m_creature)
{
//This is actually a whisper. You control the text type in database
/*현시점에서 위스퍼 라고?? 영혼이 됐다는 뜻인가. 그러니까 죽어서 영혼이 됐다 그 뜻인거 같음. 이 부분에서
에스코트 중일때, m크리쳐에게 죽었을 경우, 그렇지 않을 경우, 에스코트중이 아닐때 죽었을 경우로 나눈거 같음.*/
DoScriptText(SAY_DEATH_1, m_creature, pTemp);
}
else
DoScriptText(SAY_DEATH_2, m_creature, pTemp);
}
}
else
DoScriptText(SAY_DEATH_3, m_creature);
// Fail quest for group - if you don't implement JustDied in your script, this will automatically work
//퀘스트가 실패할 경우를 적어 놓은 겁니다. 만약 죽었을 경우를 구현하지 않았다면, 자동으로 작동됩니다.
npc_escortAI::JustDied(pKiller);
}
void UpdateEscortAI(const uint32 uiDiff)
{
// Combat check
/*팩션에 따라 적대적인 타겟을 지정합니다. udiff는 유닛끼리 디피런스를 가르키는 것으로 보입니다.
udiff가 아니라 uidiff군요. 뭔지 모르겠습니다만, 아마도 템플릿에 있는 정보의 차이점을 확인 하는 부분으로 예상 됩니다.*/
if (m_creature->SelectHostileTarget() && m_creature->getVictim())
{
if (m_uiDeathCoilTimer < uiDiff)
{
DoScriptText(SAY_SPELL, m_creature);
m_creature->CastSpell(m_creature->getVictim(), SPELL_DEATH_COIL, false);
m_uiDeathCoilTimer = 4000;
}
else
m_uiDeathCoilTimer -= uiDiff;
DoMeleeAttackIfReady();
}
else
{
//Out of combat but being escorted
//전투중이 아니지만, 에스코트 중일 때.
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (m_uiChatTimer < uiDiff)
{
if (m_creature->HasAura(SPELL_ELIXIR_OF_FORTITUDE, EFFECT_INDEX_0))
{
DoScriptText(SAY_RAND_1, m_creature);
m_creature->CastSpell(m_creature, SPELL_BLUE_FIREWORK, false);
}
else
{
DoScriptText(SAY_RAND_2, m_creature);
m_creature->CastSpell(m_creature, SPELL_ELIXIR_OF_FORTITUDE, false);
}
m_uiChatTimer = 12000;
}
else
m_uiChatTimer -= uiDiff;
}
}
}
};
CreatureAI* GetAI_example_escort(Creature* pCreature)
{
return new example_escortAI(pCreature);
}
//이 곳이 아까 define 가쉽 아이템 부분입니다.
bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature)
{
pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid());
pPlayer->PrepareGossipMenu(pCreature, pPlayer->GetDefaultGossipMenuForSource(pCreature));
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
pPlayer->SendPreparedGossip(pCreature);
return true;
}
bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
example_escortAI* pEscortAI = dynamic_cast<example_escortAI*>(pCreature->AI());
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->CLOSE_GOSSIP_MENU();
if (pEscortAI)
pEscortAI->Start(true, pPlayer);
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->CLOSE_GOSSIP_MENU();
if (pEscortAI)
pEscortAI->Start(false, pPlayer);
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->CLOSE_GOSSIP_MENU();
if (pEscortAI)
pEscortAI->Start(true, pPlayer);
break;
default:
return false; // nothing defined -> mangos core handling
}
return true; // no default handling -> prevent mangos core handling
}
//이 부분은 스크립트 로더에 쓰이는 부분입니다. 만약 스크립트를 추가 했다면 스크립트 로더에도 넣어 줘야 합니다.
void AddSC_example_escort()
{
Script* pNewScript;
pNewScript = new Script;
pNewScript->Name = "example_escort";
pNewScript->GetAI = &GetAI_example_escort;
pNewScript->pGossipHello = &GossipHello_example_escort;
pNewScript->pGossipSelect = &GossipSelect_example_escort;
pNewScript->RegisterSelf(false);
}
그저 예제를 대충 이해하고 사용했기 때문에 여기서 p_Creature 와 m_creature 같이 p와 m이 가리키는 것이 뭔지 모르겠군요.
smartAI는 정말 탁월하지요. 그걸 트리니티에서 제대로 구현하는데 1년 이상 걸린 것 같던데
필드 퀘스트의 대부분을 DB에서 구현 할 수 있을 정도로 좋아요.
고로 망고스용이 되겠군요. 여하튼 script쪽에 주석과 약간의 설명을
부과해서 알아먹기 쉽게 해놓았습니다. 나중에 뭔가 만들때 조각내서 사용하면 되겠습니다.
/* Copyright (C) 2006 - 2012 ScriptDev2 <http://www.scriptdev2.com/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Example_Escort
SD%Complete: 100
SDComment: Script used for testing escortAI
SDCategory: Script Examples
EndScriptData */
#include "precompiled.h"
#include "escort_ai.h"
//사용될 것들을 enum을 사용해 한 번에 나열해 줍니다.
enum
{
NPC_FELBOAR = 21878,
SPELL_DEATH_COIL = 33130,
SPELL_ELIXIR_OF_FORTITUDE = 3593,
SPELL_BLUE_FIREWORK = 11540,
SAY_AGGRO1 = -1999910,
SAY_AGGRO2 = -1999911,
SAY_WP_1 = -1999912,
SAY_WP_2 = -1999913,
SAY_WP_3 = -1999914,
SAY_WP_4 = -1999915,
SAY_DEATH_1 = -1999916,
SAY_DEATH_2 = -1999917,
SAY_DEATH_3 = -1999918,
SAY_SPELL = -1999919,
SAY_RAND_1 = -1999920,
SAY_RAND_2 = -1999921
};
/*여기서 사용되는 가쉽 아이템이라는 것은 에스코트중에 npc가 뛰거나, 걷는것을 조율 하는 걸로 생각됩니다.
테스트 해보지 않아서 잘 모르겠군요.망나니 탈곡기 보고 있는데, 그냥 가쉽 메뉴인가 보군요.*/
#define GOSSIP_ITEM_1 "Click to Test Escort(Attack, Run)"
#define GOSSIP_ITEM_2 "Click to Test Escort(NoAttack, Walk)"
#define GOSSIP_ITEM_3 "Click to Test Escort(NoAttack, Run)"
//에스코트 도중에 발생하는 모든 것이 작동되도록 스크립된 부분입니다.
struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI
// CreatureAI functions
//에스코트AI를 가지도록 지정하는 겁니다.
example_escortAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); }
uint32 m_uiDeathCoilTimer;
uint32 m_uiChatTimer;
// Is called after each combat, so usally only reset combat-stuff here
/*리턴이 아니니까, void로 지정합니다. 뭐, 당연한 예긴가...매 전투후에 다시 불러 들입니다 이 말은 전투 소물을
가리키는 것으로 보입니다. 아마 에스코트 중에 눈으로 보이는 스펠이 아니라 보이지 않는 가운데, 작동 되는 것일 수도
있겠다 싶군요. DB 로 짠다면 일일이 재소환해 줘야 하는 걸 자동으로 처리 되는 걸로 생각 됩니다.
예제 형식을 보니까, 데스코일이라는 것을 사용해서 뭔가 하는 거 처럼 보입니다. 이 게임에서 코일이라는
것은 대게 특정 이벤트를 유도하기 위한 조건부로 사용되고, 특정 스펠이 작동 됐을 경우 비주얼 효과를 주는 것이며, 트리거 효과를 내기 위해서라고 알고 있지만 이 예제의 내용물은 정확히 알 수 없군요.
가령 시간의 동굴에서 처럼 차원의 문을 열고 시간의 경과에 따라 채팅을 한다던가, 그런 걸로 예상 됩니다
그렇지만 여기서 사용되는 chattimer는 대화를 위한 것이 아닐꺼라 예상 합니다.
지옥 멧돼지가 소환되서 에스코트를 공격한다는 건가. 이런 퀘스트가 있었던가...단순 예제로 판단 됩니다.*/
void Reset()
{
m_uiDeathCoilTimer = 4000;
m_uiChatTimer = 4000;
}
void JustSummoned(Creature* pSummoned)
{
pSummoned->AI()->AttackStart(m_creature);
}
// Pure Virtual Functions (Have to be implemented)
/*이 부분에서 순수 aI을 사용할 거랍니다. 구현되어 있어야 한다는 군요. 기본적인 ai 기능은 대게 구현되 있을 걸로 예상 됩니다. 그렇지 않을 경우 작동되지 않을 수 있다 정도의 경고문이 되겟군요. 이 부분에서 설정하는 것은 웨이포인트 마다 지정된 행위를 하도록 설정하는 곳입니다. enum에 적었던 wp포인트 마다 대사를 읊조리도록 조정하는 내용도 포함 됐군요.웨이포인트2 번에서 지옥멧돼지가 소환되는 장소를 설정하고 사라지는 시간도 설정 됐습니다.*/
void WaypointReached(uint32 uiWP)
{
switch (uiWP)
{
case 1:
DoScriptText(SAY_WP_1, m_creature);
break;
case 3:
DoScriptText(SAY_WP_2, m_creature);
m_creature->SummonCreature(NPC_FELBOAR, m_creature->GetPositionX()+5.0f, m_creature->GetPositionY()+7.0f, m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
break;
case 4:
if (Player* pTmpPlayer = GetPlayerForEscort())
{
//pTmpPlayer is the target of the text
DoScriptText(SAY_WP_3, m_creature, pTmpPlayer);
//pTmpPlayer is the source of the text
DoScriptText(SAY_WP_4, pTmpPlayer);
}
break;
}
}
//에스코트 도중에 어그로를 가졌을 때 행위를 설정하는 곳입니다. 에스코트 중일 때 라고 내용을 한정 시켜놓았군요.
void Aggro(Unit* pWho)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (Player* pTemp = GetPlayerForEscort())
DoScriptText(SAY_AGGRO1, m_creature, pTemp);
}
else
DoScriptText(SAY_AGGRO2, m_creature);
}
// Only overwrite if there is something special
/*특별한 무엇인가가 작동되는 요건 이 있었다고 해도, 그 위에 덮어 씌우고 이걸 작동 되도록 합니다. 에스코트 크리쳐가 죽었을 때를 가정하는 거니까 당연한 거지요.*/
void JustDied(Unit* pKiller)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (Player* pTemp = GetPlayerForEscort())
{
// not a likely case, code here for the sake of example
//이러한 경우만 지칭하는 코드가 아나라 예제를 위해서 있는 거라고?
if (pKiller == m_creature)
{
//This is actually a whisper. You control the text type in database
/*현시점에서 위스퍼 라고?? 영혼이 됐다는 뜻인가. 그러니까 죽어서 영혼이 됐다 그 뜻인거 같음. 이 부분에서
에스코트 중일때, m크리쳐에게 죽었을 경우, 그렇지 않을 경우, 에스코트중이 아닐때 죽었을 경우로 나눈거 같음.*/
DoScriptText(SAY_DEATH_1, m_creature, pTemp);
}
else
DoScriptText(SAY_DEATH_2, m_creature, pTemp);
}
}
else
DoScriptText(SAY_DEATH_3, m_creature);
// Fail quest for group - if you don't implement JustDied in your script, this will automatically work
//퀘스트가 실패할 경우를 적어 놓은 겁니다. 만약 죽었을 경우를 구현하지 않았다면, 자동으로 작동됩니다.
npc_escortAI::JustDied(pKiller);
}
void UpdateEscortAI(const uint32 uiDiff)
{
// Combat check
/*팩션에 따라 적대적인 타겟을 지정합니다. udiff는 유닛끼리 디피런스를 가르키는 것으로 보입니다.
udiff가 아니라 uidiff군요. 뭔지 모르겠습니다만, 아마도 템플릿에 있는 정보의 차이점을 확인 하는 부분으로 예상 됩니다.*/
if (m_creature->SelectHostileTarget() && m_creature->getVictim())
{
if (m_uiDeathCoilTimer < uiDiff)
{
DoScriptText(SAY_SPELL, m_creature);
m_creature->CastSpell(m_creature->getVictim(), SPELL_DEATH_COIL, false);
m_uiDeathCoilTimer = 4000;
}
else
m_uiDeathCoilTimer -= uiDiff;
DoMeleeAttackIfReady();
}
else
{
//Out of combat but being escorted
//전투중이 아니지만, 에스코트 중일 때.
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (m_uiChatTimer < uiDiff)
{
if (m_creature->HasAura(SPELL_ELIXIR_OF_FORTITUDE, EFFECT_INDEX_0))
{
DoScriptText(SAY_RAND_1, m_creature);
m_creature->CastSpell(m_creature, SPELL_BLUE_FIREWORK, false);
}
else
{
DoScriptText(SAY_RAND_2, m_creature);
m_creature->CastSpell(m_creature, SPELL_ELIXIR_OF_FORTITUDE, false);
}
m_uiChatTimer = 12000;
}
else
m_uiChatTimer -= uiDiff;
}
}
}
};
CreatureAI* GetAI_example_escort(Creature* pCreature)
{
return new example_escortAI(pCreature);
}
//이 곳이 아까 define 가쉽 아이템 부분입니다.
bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature)
{
pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetObjectGuid());
pPlayer->PrepareGossipMenu(pCreature, pPlayer->GetDefaultGossipMenuForSource(pCreature));
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
pPlayer->SendPreparedGossip(pCreature);
return true;
}
bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
example_escortAI* pEscortAI = dynamic_cast<example_escortAI*>(pCreature->AI());
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->CLOSE_GOSSIP_MENU();
if (pEscortAI)
pEscortAI->Start(true, pPlayer);
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->CLOSE_GOSSIP_MENU();
if (pEscortAI)
pEscortAI->Start(false, pPlayer);
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->CLOSE_GOSSIP_MENU();
if (pEscortAI)
pEscortAI->Start(true, pPlayer);
break;
default:
return false; // nothing defined -> mangos core handling
}
return true; // no default handling -> prevent mangos core handling
}
//이 부분은 스크립트 로더에 쓰이는 부분입니다. 만약 스크립트를 추가 했다면 스크립트 로더에도 넣어 줘야 합니다.
void AddSC_example_escort()
{
Script* pNewScript;
pNewScript = new Script;
pNewScript->Name = "example_escort";
pNewScript->GetAI = &GetAI_example_escort;
pNewScript->pGossipHello = &GossipHello_example_escort;
pNewScript->pGossipSelect = &GossipSelect_example_escort;
pNewScript->RegisterSelf(false);
}
그저 예제를 대충 이해하고 사용했기 때문에 여기서 p_Creature 와 m_creature 같이 p와 m이 가리키는 것이 뭔지 모르겠군요.
-
등록일 00:21
-
등록일 00:17
-
등록일 00:16
-
등록일 09.18
관련자료
댓글 0
등록된 댓글이 없습니다.