In war3source_addon_xpmultiplier the OnPreGiveXPGold event is modified as such:
I have a race that has built into it an XP cap (since the race has 1200 levels), the code for which is:
In the past this has seemed to work fine. However we have changed the XP multiplier for a few weeks, and since I've done that it seems to be playing up as to whether the cap is enforced or not... How does the system determine which of the two functions to use? Is there a conflict between them such that it will only call one of them?
Code: [Select]
public OnWar3Event(W3EVENT:event,client)
{
if(event==OnPreGiveXPGold)
{
W3SetVar(EventArg2,FloatMul(W3GetVar(EventArg2),GetConVarFloat(MultiplierCVars[0])));
W3SetVar(EventArg3,FloatMul(W3GetVar(EventArg3),GetConVarFloat(MultiplierCVars[1])));
}
}I have a race that has built into it an XP cap (since the race has 1200 levels), the code for which is:
Code: [Select]
public OnWar3Event(W3EVENT:event,client)
{
if(event==OnPreGiveXPGold && g_bKilledTimewaster[client] == true )
{
PrintToChat(client, "Normal XP |%d|",W3GetVar(EventArg2));
W3SetVar(EventArg2,FloatDiv(W3GetVar(EventArg2),5.0));
PrintToChat(client, "Modified XP |%d|",W3GetVar(EventArg2));
g_bKilledTimewaster[client] = false;
}
}
In the past this has seemed to work fine. However we have changed the XP multiplier for a few weeks, and since I've done that it seems to be playing up as to whether the cap is enforced or not... How does the system determine which of the two functions to use? Is there a conflict between them such that it will only call one of them?


Logged
