trevius
10-15-2008, 06:07 PM
I don't think I have ever seen any Memory Blur spells work in the emu. I think the problem was that it was only wiping the hate list for NPCs and not client hate lists. It may actually work in the current SVN with the recent changes to hate lists now only being on NPCs. But, in the case that it gets reverted back so both Clients and NPCs have hate lists again, I think we need to just wipe all hate lists as shown below.
The other thing that I noticed was that even if the code for Memory Blur did work, it is still missing something important. Any spell that has no limitation for wipechance will be set to 0. But, the code wasn't checking for 0, so those types of spells would always fail. The most common spell that uses this setting is Guide Memory Blur, which is the instant clicky on GM shoulders. So, I added the 0 check in there as well.
I haven't tested this yet, but I figured I would post here first to see if anyone had any thoughts on how I am doing this, or if charm is already working properly and I am just crazy or something :P
spell_effects.cpp - replace the current SE_WhipeHateList with this:
case SE_WipeHateList:
{
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Memory Blur: %d", effect_value);
#endif
int wipechance = spells[spell_id].base[i];
if(MakeRandomInt(0, 100) < wipechance || wipechance == 1)
{
WhipeHateList();
Message(13, "Your memory blurs");
}
break;
}
The other thing that I noticed was that even if the code for Memory Blur did work, it is still missing something important. Any spell that has no limitation for wipechance will be set to 0. But, the code wasn't checking for 0, so those types of spells would always fail. The most common spell that uses this setting is Guide Memory Blur, which is the instant clicky on GM shoulders. So, I added the 0 check in there as well.
I haven't tested this yet, but I figured I would post here first to see if anyone had any thoughts on how I am doing this, or if charm is already working properly and I am just crazy or something :P
spell_effects.cpp - replace the current SE_WhipeHateList with this:
case SE_WipeHateList:
{
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Memory Blur: %d", effect_value);
#endif
int wipechance = spells[spell_id].base[i];
if(MakeRandomInt(0, 100) < wipechance || wipechance == 1)
{
WhipeHateList();
Message(13, "Your memory blurs");
}
break;
}