From 0137a8c1932cfc2c9378fa7536b32806fec31b21 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 28 Jul 2010 12:51:04 +0200 Subject: Add better crash dump output for windows --HG-- branch : trunk --- .../shared/Debugging/WheatyExceptionReport.cpp | 30 ++++++++++++++++++++-- .../shared/Debugging/WheatyExceptionReport.h | 2 ++ 2 files changed, 30 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp index 8fb5d5e2d2a..fa1cfe08215 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.cpp +++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp @@ -39,8 +39,10 @@ inline LPTSTR ErrorMessage(DWORD dw) // Declare the static variables of the WheatyExceptionReport class // TCHAR WheatyExceptionReport::m_szLogFileName[MAX_PATH]; +TCHAR WheatyExceptionReport::m_szDumpFileName[MAX_PATH]; LPTOP_LEVEL_EXCEPTION_FILTER WheatyExceptionReport::m_previousFilter; HANDLE WheatyExceptionReport::m_hReportFile; +HANDLE WheatyExceptionReport::m_hDumpFile; HANDLE WheatyExceptionReport::m_hProcess; // Declare global instance of class @@ -88,8 +90,19 @@ PEXCEPTION_POINTERS pExceptionInfo) SYSTEMTIME systime; GetLocalTime(&systime); - sprintf(m_szLogFileName, "%s\\%s_[%u-%u_%u-%u-%u].txt", - crash_folder_path, pos, systime.wDay, systime.wMonth, systime.wHour, systime.wMinute, systime.wSecond); + sprintf(m_szDumpFileName, "%s\\%s_%s_[%u-%u_%u-%u-%u].dmp", + crash_folder_path, _REVISION, pos, systime.wDay, systime.wMonth, systime.wHour, systime.wMinute, systime.wSecond); + + sprintf(m_szLogFileName, "%s\\%s_%s_[%u-%u_%u-%u-%u].txt", + crash_folder_path, _REVISION, pos, systime.wDay, systime.wMonth, systime.wHour, systime.wMinute, systime.wSecond); + + m_hDumpFile = CreateFile(m_szDumpFileName, + GENERIC_WRITE, + 0, + 0, + OPEN_ALWAYS, + FILE_FLAG_WRITE_THROUGH, + 0); m_hReportFile = CreateFile(m_szLogFileName, GENERIC_WRITE, @@ -99,6 +112,19 @@ PEXCEPTION_POINTERS pExceptionInfo) FILE_FLAG_WRITE_THROUGH, 0); + if (m_hDumpFile) + { + MINIDUMP_EXCEPTION_INFORMATION info; + info.ClientPointers = FALSE; + info.ExceptionPointers = pExceptionInfo; + info.ThreadId = GetCurrentThreadId(); + + MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), + m_hDumpFile, MiniDumpWithIndirectlyReferencedMemory, &info, 0, 0); + + CloseHandle(m_hDumpFile); + } + if (m_hReportFile) { SetFilePointer(m_hReportFile, 0, 0, FILE_END); diff --git a/src/server/shared/Debugging/WheatyExceptionReport.h b/src/server/shared/Debugging/WheatyExceptionReport.h index 33fb4bc5b0e..10d8ad0f629 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.h +++ b/src/server/shared/Debugging/WheatyExceptionReport.h @@ -108,8 +108,10 @@ class WheatyExceptionReport // Variables used by the class static TCHAR m_szLogFileName[MAX_PATH]; + static TCHAR m_szDumpFileName[MAX_PATH]; static LPTOP_LEVEL_EXCEPTION_FILTER m_previousFilter; static HANDLE m_hReportFile; + static HANDLE m_hDumpFile; static HANDLE m_hProcess; }; -- cgit v1.2.3 From 045bf5163b33599429f91290ff2edb702f186efb Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 28 Jul 2010 12:57:00 +0200 Subject: Fixed spellpower coef for Lifebloom final heal --HG-- branch : trunk --- sql/base/world_database.sql | 2 +- sql/updates/9063_world_spell_bonus_data.sql | 3 +++ src/server/game/Spells/Auras/SpellAuraEffects.cpp | 24 +++++++++++------------ src/server/game/Spells/SpellEffects.cpp | 3 +++ 4 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 sql/updates/9063_world_spell_bonus_data.sql (limited to 'src') diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index fbe88688b22..760a451980e 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -5005,7 +5005,7 @@ INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`a (42231, 0.12898, -1, -1, -1, 'Druid - Hurricane Triggered'), (5570, -1, 0.2, -1, -1, 'Druid - Insect Swarm'), (33745, -1, -1, -1, 0.01, 'Druid - Lacerate($AP*0.05 / number of ticks)'), -(33778, 0.516, 0, 0, 0, 'Druid - Lifebloom final heal'), +(33778, 0.589714, 0, 0, 0, 'Druid - Lifebloom final heal'), (33763, 0, 0.09518, 0, 0, 'Druid - Lifebloom HoT(rank 1)'), (48450, 0, 0.09518, 0, 0, 'Druid - Lifebloom HoT(rank 2)'), (48451, 0, 0.09518, 0, 0, 'Druid - Lifebloom HoT(rank 3)'), diff --git a/sql/updates/9063_world_spell_bonus_data.sql b/sql/updates/9063_world_spell_bonus_data.sql new file mode 100644 index 00000000000..78b87493041 --- /dev/null +++ b/sql/updates/9063_world_spell_bonus_data.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_bonus_data` WHERE `entry`=33778; +INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`ap_dot_bonus`,`comments`) VALUES +(33778,0.589714,0,0,0, 'Druid - Lifebloom final heal'); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 7da5559c4c5..b9da2fffb80 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5726,21 +5726,19 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo // Lifebloom if (GetSpellProto()->SpellFamilyFlags[1] & 0x10) { - if (!apply) - { - // Final heal only on dispelled or duration end - if (aurApp->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && aurApp->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) - return; + // Final heal only on dispelled or duration end + if (aurApp->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && aurApp->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) + return; - // final heal - target->CastCustomSpell(target,33778,&m_amount,NULL,NULL,true,NULL,this,GetCasterGUID()); + // final heal + uint32 stack = GetBase()->GetStackAmount(); + target->CastCustomSpell(target, 33778, &m_amount, &stack, NULL, true, NULL, this, GetCasterGUID()); - // restore mana - if (caster) - { - int32 returnmana = (GetSpellProto()->ManaCostPercentage * caster->GetCreateMana() / 100) * GetBase()->GetStackAmount() / 2; - caster->CastCustomSpell(caster, 64372, &returnmana, NULL, NULL, true, NULL, this, GetCasterGUID()); - } + // restore mana + if (caster) + { + int32 returnmana = (GetSpellProto()->ManaCostPercentage * caster->GetCreateMana() / 100) * stack / 2; + caster->CastCustomSpell(caster, 64372, &returnmana, NULL, NULL, true, NULL, this, GetCasterGUID()); } } break; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index f5c590f891a..5a33026bdb9 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2776,6 +2776,9 @@ void Spell::SpellDamageHeal(uint32 /*i*/) } } } + // Lifebloom - final heal coef multiplied by original DoT stack + else if (m_spellInfo->Id == 33778) + addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL, m_spellValue->EffectBasePoints[1]); // Riptide - increase healing done by Chain Heal else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellInfo->SpellFamilyFlags[0] & 0x100) { -- cgit v1.2.3 From 0fbb3af7a3af37cd97f57ad86776296f574de55b Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 28 Jul 2010 13:00:30 +0200 Subject: Typo fix for previous revision --HG-- branch : trunk --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index b9da2fffb80..46b4fa0a0b1 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5731,7 +5731,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo return; // final heal - uint32 stack = GetBase()->GetStackAmount(); + int32 stack = GetBase()->GetStackAmount(); target->CastCustomSpell(target, 33778, &m_amount, &stack, NULL, true, NULL, this, GetCasterGUID()); // restore mana -- cgit v1.2.3