aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp7
-rw-r--r--src/server/game/Entities/Player/Player.cpp2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp8
-rw-r--r--src/server/game/Quests/QuestDef.cpp2
-rw-r--r--src/server/game/Quests/QuestDef.h2
-rw-r--r--src/server/game/Server/Protocol/Handlers/QuestHandler.cpp2
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp24
-rw-r--r--src/server/game/Spells/SpellEffects.cpp3
-rw-r--r--src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp3
-rw-r--r--src/server/shared/Debugging/WheatyExceptionReport.cpp30
-rw-r--r--src/server/shared/Debugging/WheatyExceptionReport.h2
11 files changed, 64 insertions, 21 deletions
diff --git a/src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp b/src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp
index 408f4ab2397..f1e120bf4d8 100644
--- a/src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp
+++ b/src/server/game/BattleGrounds/Zones/BattleGroundSA.cpp
@@ -830,8 +830,11 @@ void BattleGroundSA::UpdateDemolisherSpawns()
{
uint8 gy = (i >= BG_SA_DEMOLISHER_3 ? 3 : 2);
if (GraveyardStatus[gy] == attackers)
- Demolisher->Relocate(BG_SA_NpcSpawnlocs[i + 11][0], BG_SA_NpcSpawnlocs[i + 10][1],
- BG_SA_NpcSpawnlocs[i + 10][2], BG_SA_NpcSpawnlocs[i + 10][3]);
+ Demolisher->Relocate(BG_SA_NpcSpawnlocs[i + 11][0], BG_SA_NpcSpawnlocs[i + 11][1],
+ BG_SA_NpcSpawnlocs[i + 11][2], BG_SA_NpcSpawnlocs[i + 11][3]);
+ else
+ Demolisher->Relocate(BG_SA_NpcSpawnlocs[i][0], BG_SA_NpcSpawnlocs[i][1],
+ BG_SA_NpcSpawnlocs[i][2], BG_SA_NpcSpawnlocs[i][3]);
Demolisher->Respawn();
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 760a681c02b..8b2b74b572d 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -13918,7 +13918,7 @@ void Player::SendPreparedQuest(uint64 guid)
return;
}
- if (pQuest->HasFlag(QUEST_TRINITY_FLAGS_AUTO_ACCEPT) && CanAddQuest(pQuest, true))
+ if (pQuest->IsAutoAccept() && CanAddQuest(pQuest, true))
{
AddQuest(pQuest, pObject);
if (CanCompleteQuest(quest_id))
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 1388ab44748..94295a8b564 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -4735,12 +4735,18 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
tablename,tmp.datalong2,tmp.id);
continue;
}
- if (tmp.dataint & ~0x1) // 1 bit (0,1)
+ if (tmp.datalong2 != 4 && tmp.dataint & ~0x1) // 1 bit (0,1)
{
sLog.outErrorDb("Table `%s` using unknown flags in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tablename,tmp.dataint,tmp.id);
continue;
}
+ else if (tmp.datalong2 == 4 && !GetCreatureTemplate(tmp.dataint))
+ {
+ sLog.outErrorDb("Table `%s` using invalid creature entry in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
+ tablename,tmp.dataint,tmp.id);
+ continue;
+ }
break;
}
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 43ad7ffc114..553d7630fae 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -143,6 +143,8 @@ Quest::Quest(Field * questRecord)
QuestCompleteScript = questRecord[143].GetUInt32();
QuestFlags |= SpecialFlags << 20;
+ if (QuestFlags & QUEST_TRINITY_FLAGS_AUTO_ACCEPT)
+ QuestFlags |= QUEST_FLAGS_AUTO_ACCEPT;
m_reqitemscount = 0;
m_reqCreatureOrGOcount = 0;
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index f524b7935cb..28cd7ac5cd8 100644
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -246,7 +246,7 @@ class Quest
bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; }
bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; }
bool IsDailyOrWeekly() const { return QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
- bool IsAutoAccept() const { return QuestFlags & QUEST_TRINITY_FLAGS_AUTO_ACCEPT; }
+ bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; }
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
bool IsAllowedInRaid() const;
diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
index 35cc582ccc2..a6cb13a02e2 100644
--- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
@@ -246,7 +246,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
Quest const* pQuest = objmgr.GetQuestTemplate(quest);
if (pQuest)
{
- if (pQuest->HasFlag(QUEST_TRINITY_FLAGS_AUTO_ACCEPT) && _player->CanAddQuest(pQuest, true))
+ if (pQuest->IsAutoAccept() && _player->CanAddQuest(pQuest, true))
{
_player->AddQuest(pQuest, pObject);
if (_player->CanCompleteQuest(quest))
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 7da5559c4c5..46b4fa0a0b1 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
+ int32 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)
{
diff --git a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
index 65d870afc0d..2ba09a875f7 100644
--- a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
@@ -297,6 +297,7 @@ struct boss_sartharionAI : public ScriptedAI
{
pTenebron->Respawn();
pTenebron->GetMotionMaster()->MoveTargetedHome();
+ pTenebron->SetLootRecipient(NULL);
}
}
}
@@ -314,6 +315,7 @@ struct boss_sartharionAI : public ScriptedAI
{
pShadron->Respawn();
pShadron->GetMotionMaster()->MoveTargetedHome();
+ pShadron->SetLootRecipient(NULL);
}
}
}
@@ -331,6 +333,7 @@ struct boss_sartharionAI : public ScriptedAI
{
pVesperon->Respawn();
pVesperon->GetMotionMaster()->MoveTargetedHome();
+ pVesperon->SetLootRecipient(NULL);
}
}
}
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;
};