[3.3.5] Death Knight - Raise Dead (Ghoul) - Eternal CD
1- Use [Raise Dead] 2- Kill or Sacrifice the Ghoul 3- Wait for your cooldown to reset... wait a little more, maybe some more time... noup, it doesn't reset.
Proof: http://www.youtube.com/watch?v=jR5WGpi8GdI
[Raise Dead] was "Working" decently before acd46085d1f496657e27e0d5f823f53d466702dc, now it gets bugged every time the Ghoul it's killed.
Rev: a242662ae6fd424928c3972de1232b43e7164457 DB: Fresh TDB 52 with all updates
the problem is the cooldownevent, on tc there is only send 1, but on retail there are 2
hackfix:
add this line in spell_dk_raise_dead_SpellScript::HandleRaiseDead before casting the summon spell
GetCaster()->ToPlayer()->RemoveSpellCooldown(GetSpellInfo()->Id, true);
can anyone test this code?
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -21850,6 +21863,35 @@ void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/
data << uint32(spellInfo->Id);
data << uint64(GetGUID());
SendDirectMessage(&data);
+
+ uint32 cat = spellInfo->GetCategory();
+ uint32 catRec = spellInfo->CategoryRecoveryTime;
+ if (cat && catRec)
+ {
+ SpellCategoryStore::const_iterator ct = sSpellsByCategoryStore.find(cat);
+ if (ct != sSpellsByCategoryStore.end())
+ {
+ SpellCategorySet const& catSet = ct->second;
+ for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end(); ++i)
+ {
+ if (i->first == spellInfo->Id) // skip main spell, already handled above
+ continue;
+
+ SpellInfo const* spellInfo2 = sSpellMgr->GetSpellInfo(i->first);
+ if (!spellInfo2->IsCooldownStartedOnEvent())
+ continue;
+
+ if (catSet.find(i->first) != catSet.end())
+ {
+ // Send activate cooldown timer (possible 0) at client side
+ WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8);
+ data << uint32(i->first);
+ data << uint64(GetGUID());
+ SendDirectMessage(&data);
+ }
+ }
+ }
+ }
}
void Player::UpdatePotionCooldown(Spell* spell)
@joschiwald Seems to work good ^^
my patch is incorrect or incomplete, it's the only one spell that sends 2 cooldown events at same time, base spell and triggered summon spell
@joschiwald it crashes the server: GetCaster()->ToPlayer()->RemoveSpellCooldown(GetSpellInfo()->Id, true);
@joschiwald Your 2nd patch is working good.
Confirmed, But the patch not working for me :C Anyone else test it?
@xlain It worked for me.
seems to be working ok for me
TrinityCore rev. 87b973c2806f same problem by killed ghoul or clicked to let go
anyone any idea on fixing this properly?
@joschiwald second code works perfectly :+1:
@ those of you above who posted "worked for me": is your OS Windows or Linux? (I can only remember @digz6666 using Windows 2012 Server x64). Just so we can compare your test result replies.
@tkrokli Yes I use Windows Server 2012 x64 and 64bit compiler.
@tkrokli this issue and patch dont depend on which os we use ;)
OK, I just thought maybe it could be related to the crash logs issue that seem to afflict Linux most. Edit: (seeing that the suggested patch works for some people and not work for others).
after some digging around it seems it crashes on linux on some occasions...least for me...somethign about IsCooldownStartedOnEvent
Why its closed?
Yeah still bugged https://github.com/TrinityCore/TrinityCore/commit/8197da743cd5a9a2c4df73e53b9f9dc44cbec1d5
I will test the suggested second patch by @joschiwald , adding it to the current 3.3.5 branch of today (8197da743cd5a9a2c4df73e53b9f9dc44cbec1d5). In the whole year that has passed, the line numbers in Player.cpp has increased quite a bit. Don't use diff, it could very well misplace the inserted code. If you add it manually, the original lines
void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/
data << uint32(spellInfo->Id);
data << uint64(GetGUID());
SendDirectMessage(&data);
is not found on the lines numbered 21850-21863, but on the lines numbered 22130-22141 as well as have changed a bit in content. The current code, leading up to the point where you can insert @joschiwald's suggested fix, looks like this:
void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, Spell* spell /*= NULL*/, bool setCooldown /*= true*/)
{
// start cooldowns at server side, if any
if (setCooldown)
AddSpellAndCategoryCooldowns(spellInfo, itemId, spell);
// Send activate cooldown timer (possible 0) at client side
WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8);
data << uint32(spellInfo->Id);
data << uint64(GetGUID());
SendDirectMessage(&data);
}
To be honest, I don't know why this issue got closed without explanation, I can only guess. My guess is that there has not happened anything productive here in a year, as well as 3.3.5 being replaced by 6.x as the main branch of TrinityCore, thus 3.3.5 getting lower priority than 6.x. The only way to get this issue back in the works is to come up with some productive feedback and results.
15>------ Build started: Project: INSTALL, Configuration: Release Win32 ------
15> -- Install configuration: "Release"
15> -- Installing: C:/Program Files (x86)/TrinityCore/authserver.exe
15> -- Installing: C:/Program Files (x86)/TrinityCore/authserver.conf.dist
15> -- Installing: C:/Program Files (x86)/TrinityCore/worldserver.exe
15> -- Installing: C:/Program Files (x86)/TrinityCore/worldserver.conf.dist
========== Build: 15 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Edit: Preparing to test with commit 32a728b33162d5f2a0f0f4b648e1a25b886544a2 .