EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   $faction bug fix (https://www.eqemulator.org/forums/showthread.php?t=29182)

demonstar55 08-09-2009 11:35 AM

$faction bug fix
 
currently this quest variable is passing client->GetID() instead of client->CharacterID(), which the function wants

not sure if this will cause problems with anything else so if it gets committed make sure you look for problems or something (I didn't find any)

Code:

Index: EQEmuServer/zone/embparser.cpp
===================================================================
--- EQEmuServer/zone/embparser.cpp        (revision 899)
+++ EQEmuServer/zone/embparser.cpp        (working copy)
@@ -368,7 +368,7 @@
 
                        // Need to figure out why one of these casts would fail..
                        if (client && npc) {
-                                fac = client->GetFactionLevel(client->GetID(), npcmob->GetID(), client->GetRace(), client->GetClass(), DEITY_AGNOSTIC, npc->GetPrimaryFaction(), npcmob);
+                                fac = client->GetFactionLevel(client->CharacterID(), npcmob->GetID(), client->GetRace(), client->GetClass(), DEITY_AGNOSTIC, npc->GetPrimaryFaction(), npcmob);
                        }
                        else if (!client) {
                                LogFile->write(EQEMuLog::Status, "WARNING: cast failure on mob->CastToClient()");


cavedude 08-12-2009 05:00 PM

This is in 922.

Nachyoz 09-19-2009 02:40 AM

The current faction code given does not take into account the character's choice of deity. I'm not sure why but in embparser.cpp its just using agnostic.


Code:

                                fac = client->GetFactionLevel(client->CharacterID(), npcmob->GetID(), client->GetRace(), client->GetClass(), DEITY_AGNOSTIC, npc->GetPrimaryFaction(), npcmob);
could be

Code:

                                fac = client->GetFactionLevel(client->CharacterID(), npcmob->GetID(), client->GetRace(), client->GetClass(), client->GetDeity(), npc->GetPrimaryFaction(), npcmob);
I ran into this issue when trying to write a quest where the NPC's primary faction is base -600 with +1000 for a certain deity. In the game the NPC cons correctly but the perl script always gives dubious.

-Nachyoz

cavedude 09-27-2009 12:39 PM

Added the last change to revision 995.


All times are GMT -4. The time now is 10:15 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.