Jump to content

Quest - Event Dead


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Open quest.h
find the line:

QUEST_ITEM_INFORMER_EVENT,

Add after:

QUEST_DEAD_EVENT,

Open questmanager.cpp

find the line:

m_mapEventName.insert(TEventNameMap::value_type("item_informer", QUEST_ITEM_INFORMER_EVENT));

Add after:

m_mapEventName.insert(TEventNameMap::value_type("dead", QUEST_DEAD_EVENT));

add function:

void CQuestManager::Dead(unsigned int pc)

    {
        PC * pPC;

        if ((pPC = GetPC(pc)))
        {
            if (!CheckQuestLoaded(pPC))
                return;

            m_mapNPC[QUEST_NO_NPC].OnDead(*pPC);
        }
        else
            sys_err("QUEST no such pc id : %d", pc);
    }

open questmanager.h

find the line:

void        Kill(unsigned int pc, unsigned int npc);

add after:

void        Dead(unsigned int pc);

open questnpc.quest

add function:

    bool NPC::OnDead(PC& pc)

    {
        return HandleReceiveAllEvent(pc, QUEST_DEAD_EVENT);
    }

questnpc.h

find the line:

bool    OnKill(PC& pc);

add after:

bool    OnDead(PC& pc);

open char_battle.cpp

fine the line:

void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead)

added at the beginning:

quest::CQuestManager::instance().Dead(GetPlayerID());

Usage:

when dead begin
    syschat("You are dead.")
end

Enjoy!

  • Metin2 Dev 5
  • Not Good 1
  • Good 1
  • Love 5
Link to comment
Share on other sites

  • Bronze

Open quest.h

find the line

QUEST_ITEM_INFORMER_EVENT,

Add after 

QUEST_DEAD_EVENT,

Open questmanager.cpp

find the line

m_mapEventName.insert(TEventNameMap::value_type("item_informer", QUEST_ITEM_INFORMER_EVENT));

Add after 

m_mapEventName.insert(TEventNameMap::value_type("dead", QUEST_DEAD_EVENT));

add function 

void CQuestManager::Dead(unsigned int pc)
    {
        PC * pPC;

        if ((pPC = GetPC(pc)))
        {
            if (!CheckQuestLoaded(pPC))
                return;

            m_mapNPC[QUEST_NO_NPC].OnDead(*pPC);
        }
        else
            sys_err("QUEST no such pc id : %d", pc);
    }

open questmanager.h

find the line 

void        Kill(unsigned int pc, unsigned int npc);

add after

void        Dead(unsigned int pc);

open questnpc.quest

add function

    bool NPC::OnDead(PC& pc)
    {
        return HandleReceiveAllEvent(pc, QUEST_DEAD_EVENT);
    }

questnpc.h

find the line 

bool    OnKill(PC& pc);

add after 

bool    OnDead(PC& pc);

open char_battle.cpp

 

fine the line

void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead)

added at the beginning

quest::CQuestManager::instance().Dead(GetPlayerID());

Sorry my bad English and bad decor

 

use the code next time

and i think your english is usefull for topic like this ^^

thanks anyway

Link to comment
Share on other sites

 

Open quest.h

find the line

QUEST_ITEM_INFORMER_EVENT,

Add after 

QUEST_DEAD_EVENT,

Open questmanager.cpp

find the line

m_mapEventName.insert(TEventNameMap::value_type("item_informer", QUEST_ITEM_INFORMER_EVENT));

Add after 

m_mapEventName.insert(TEventNameMap::value_type("dead", QUEST_DEAD_EVENT));

add function 

void CQuestManager::Dead(unsigned int pc)
    {
        PC * pPC;

        if ((pPC = GetPC(pc)))
        {
            if (!CheckQuestLoaded(pPC))
                return;

            m_mapNPC[QUEST_NO_NPC].OnDead(*pPC);
        }
        else
            sys_err("QUEST no such pc id : %d", pc);
    }

open questmanager.h

find the line 

void        Kill(unsigned int pc, unsigned int npc);

add after

void        Dead(unsigned int pc);

open questnpc.quest

add function

    bool NPC::OnDead(PC& pc)
    {
        return HandleReceiveAllEvent(pc, QUEST_DEAD_EVENT);
    }

questnpc.h

find the line 

bool    OnKill(PC& pc);

add after 

bool    OnDead(PC& pc);

open char_battle.cpp

 

fine the line

void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead)

added at the beginning

quest::CQuestManager::instance().Dead(GetPlayerID());

Sorry my bad English and bad decor

 

use the code next time

and i think your english is usefull for topic like this ^^

thanks anyway

 

 

I am from Russia. therefore use translate.google.ru :)

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.