branchmerge - urgh!

--HG--
branch : trunk
This commit is contained in:
click
2010-07-28 19:40:37 +02:00
13 changed files with 69 additions and 23 deletions
@@ -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();
}
+1 -1
View File
@@ -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))
+7 -1
View File
@@ -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;
}
+2
View File
@@ -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;
+1 -1
View File
@@ -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;
@@ -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))
@@ -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
int32 stack = GetBase()->GetStackAmount();
target->CastCustomSpell(target, 33778, &m_amount, &stack, NULL, true, NULL, this, GetCasterGUID());
// restore mana
if (caster)
{
// 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());
// 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());
}
int32 returnmana = (GetSpellProto()->ManaCostPercentage * caster->GetCreateMana() / 100) * stack / 2;
caster->CastCustomSpell(caster, 64372, &returnmana, NULL, NULL, true, NULL, this, GetCasterGUID());
}
}
break;
+3
View File
@@ -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)
{