View Full Version : Charm Spell Issues
Figback65
01-24-2016, 12:01 AM
Another charm thread.
Every build of new version that is released over the last few years has always caused the same charm issue for me and I can never figure out how to fix it nor find a fix on the forums so its time for me to ask.
When you have a npc charmed you can click the get lost button to break it.
When you die with a npc charmed your charm stays there after dead and continues to fight for you instead of reverting back to a NPC.
Anybody know a fix? Sounds like a coding thing to me. I have gone over and over it in the spell file.
Uleat
01-24-2016, 12:16 AM
I haven't played with charm spells much - and I don't know what live behavior should be...
But, You could take a look here for the get lost issue: https://github.com/EQEmu/Server/blob/master/zone/client_packet.cpp#L9957
And here for the death issue: https://github.com/EQEmu/Server/blob/master/zone/attack.cpp#L1367
(Remark out the first one..)
(Add pet pointer validity and pet-type checks, then the spell fade call from the 'get lost' code..)
Figback65
01-24-2016, 01:08 PM
Cool thanks Uleat.
Live like charm worked as followed :
Could not break charm with get lost button
Charm pets reverted back to NPC upon owner death
Charm was a duration (currently works)
Charm was only broke by invis, hide, or duration timer (I believe those all work)
Unfortunately this is outta my league but I will keep going back to it and hopefully be able to fix it. I assumed it was live like but my build was always broke or I forgot something in .sql update.
demonstar55
01-24-2016, 02:45 PM
What client?
Figback65
01-24-2016, 10:09 PM
I use titanium client for my server.
EDIT : I would love to use UF but I want classic HPH and you cant get that unless titanium :/
Figback65
01-30-2016, 05:55 PM
Yup, no idea. Way outta my league, I am not a coder. I can do perl scripts by being self taught here and researching examples. Creating code in c++ is another story.
Maybe one day it will be more livelike by default in the emu. I guess ill have to wait till then unless I find a coder to help on my server.
Thanks for the guidance guys!!!
demonstar55
01-30-2016, 07:48 PM
I fixed one of the issues, but I need to clean up it up since there are some useless flags now that can be removed so I didn't say I fixed the issue :P
Figback65
02-01-2016, 07:06 PM
I'm very interested if you get it complete Demonstar
Figback65
03-16-2016, 07:10 PM
Charm seems to be working in the latest build of march 2016, but previous build I had this was still broken. For anybody with older builds this is how I fixed charm
client_packet.cpp
case PET_GETLOST: {
if (mypet->Charmed())
break;
if (mypet->GetPetType() == petCharmed || !mypet->IsNPC()) {
// eqlive ignores this command
// we could just remove the charm
// and continue
// mypet->BuffFadeByEffect(SE_Charm);
break;
}
else {
SetPet(nullptr);
}
attack.cpp
/*
#2: figure out things that affect the player dying and mark them dead
*/
InterruptSpell();
SetPet(0);
SetHorseId(0);
dead = true;
if(GetMerc()) {
GetMerc()->Suspend();
}
if (GetPetType() == petCharmed) { #Added Pet break and wipe on death
BuffFadeByEffect(SE_Charm);
WipeHateList();
SetTarget(nullptr);
}
Uleat
03-16-2016, 08:02 PM
The only thing I got out of that was something about "petting a dead horse" :shock:
Figback65
03-16-2016, 08:12 PM
The only thing I got out of that was something about "petting a dead horse" :shock:
Hmmm, worked on my old build, lol.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.