Jump to content

Problem with double kill in quest


Recommended Posts

  • Premium

If I understood well the source ( I didn't tested yet ), the solution you tried is quite stupid.

if (npc != QUEST_NO_NPC)
	m_mapNPC[QUEST_NO_NPC].OnKill(*pPC);

This extra function will also do a extra call, so more triggers.

 

Try this - not tested and if it works let us know:

Find this ( SAME function you posted ):

if (m_mapNPC[QUEST_NO_NPC].OnKill(*pPC))
	return;

if (leader)
{
	m_pCurrentPartyMember = ch;
	m_mapNPC[QUEST_NO_NPC].OnPartyKill(*GetPC(leader->GetPlayerID()));
}

And comment it. Try to test if it's still bugged. This also may cause another bug: the function may not trigger at all! So test it in all ways possible. Kill a player and then a mob.

  • Love 1
Link to comment
Share on other sites

If I understood well the source ( I didn't tested yet ), the solution you tried is quite stupid.

if (npc != QUEST_NO_NPC)
	m_mapNPC[QUEST_NO_NPC].OnKill(*pPC);

This extra function will also do a extra call, so more triggers.

 

Try this - not tested and if it works let us know:

Find this ( SAME function you posted ):

if (m_mapNPC[QUEST_NO_NPC].OnKill(*pPC))
	return;

if (leader)
{
	m_pCurrentPartyMember = ch;
	m_mapNPC[QUEST_NO_NPC].OnPartyKill(*GetPC(leader->GetPlayerID()));
}

And comment it. Try to test if it's still bugged. This also may cause another bug: the function may not trigger at all! So test it in all ways possible. Kill a player and then a mob.

ok i go to try it, thanks for reply :)

Link to comment
Share on other sites

  • Active Member

Open your questmanager.cpp;
 
Search:

m_mapNPC[npc].OnKill(*pPC);

Change with this:

if (npc > MAIN_RACE_MAX_NUM)
	m_mapNPC[npc].OnKill(*pPC);
m_mapNPC[QUEST_NO_NPC].OnKill(*pPC);

----

 

Search:

m_pCurrentPartyMember = ch;

if (m_mapNPC[npc].OnPartyKill(*GetPC(leader->GetPlayerID())))
	return;

pPC = GetPC(pc);

Change with this:

m_pCurrentPartyMember = ch;

if (npc > MAIN_RACE_MAX_NUM)
	m_mapNPC[npc].OnPartyKill(*GetPC(leader->GetPlayerID()));
m_mapNPC[QUEST_NO_NPC].OnPartyKill(*GetPC(leader->GetPlayerID()));

//pPC = GetPC(pc);
  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 4

      Feeding game source to LLM

    2. 0

      Quest 6/7 Problem

    3. 5

      Effect weapons

    4. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    5. 3

      Crystal Metinstone

    6. 4

      Feeding game source to LLM

    7. 113

      Ulthar SF V2 (TMP4 Base)

    8. 4

      Feeding game source to LLM

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.