aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2011_09_03_02_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_03_02_spell_script_names.sql)0
-rw-r--r--sql/updates/world/2011_09_04_02_world_trinity_string.sql1
-rwxr-xr-xsrc/server/game/Entities/Creature/GossipDef.cpp2
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp14
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp8
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp2
6 files changed, 17 insertions, 10 deletions
diff --git a/sql/updates/world/2011_09_03_02_spell_script_names.sql b/sql/updates/world/2011_09_03_02_world_spell_script_names.sql
index b7b6907b7f1..b7b6907b7f1 100644
--- a/sql/updates/world/2011_09_03_02_spell_script_names.sql
+++ b/sql/updates/world/2011_09_03_02_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_04_02_world_trinity_string.sql b/sql/updates/world/2011_09_04_02_world_trinity_string.sql
new file mode 100644
index 00000000000..36722947feb
--- /dev/null
+++ b/sql/updates/world/2011_09_04_02_world_trinity_string.sql
@@ -0,0 +1 @@
+UPDATE `trinity_string` SET `content_default`='Faction %s (%u) can''t have reputation.' WHERE `entry`=326; -- can'nt -> can't
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index e17f8163bff..0d91b476fdd 100755
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -441,7 +441,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
data << uint32(quest->GetRepObjectiveFaction()); // shown in quest log as part of quest objective
data << uint32(quest->GetRepObjectiveValue()); // shown in quest log as part of quest objective
- data << uint32(quest->GetRepObjectiveFaction2()); // shown in quest log as part of quest objective OPOSITE faction
+ data << uint32(quest->GetRepObjectiveFaction2()); // shown in quest log as part of quest objective OPPOSITE faction
data << uint32(quest->GetRepObjectiveValue2()); // shown in quest log as part of quest objective OPPOSITE faction
data << uint32(quest->GetNextQuestInChain()); // client will request this quest from NPC, if not 0
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 7052615e9c1..e0adb99bc37 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14630,10 +14630,6 @@ bool Player::CanCompleteQuest(uint32 quest_id)
if (repFacId && GetReputationMgr().GetReputation(repFacId) < qInfo->GetRepObjectiveValue())
return false;
- uint32 repFacId2 = qInfo->GetRepObjectiveFaction2();
- if (repFacId2 && GetReputationMgr().GetReputation(repFacId2) < qInfo->GetRepObjectiveValue2())
- return false;
-
return true;
}
}
@@ -15266,6 +15262,16 @@ bool Player::SatisfyQuestReputation(Quest const* qInfo, bool msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
return false;
}
+
+ // ReputationObjective2 does not seem to be an objective requirement but a requirement
+ // to be able to accept the quest
+ uint32 fIdObj = qInfo->GetRepObjectiveFaction2();
+ if (fIdObj && GetReputationMgr().GetReputation(fIdObj) >= qInfo->GetRepObjectiveValue2())
+ {
+ if (msg)
+ SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
+ return false;
+ }
return true;
}
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index e1b37c121a7..62b2ce0c440 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -3931,28 +3931,28 @@ void ObjectMgr::LoadQuests()
// no changes, quest can't be done for this requirement
}
- if (!qinfo->RepObjectiveFaction && qinfo->RepObjectiveValue > 0)
+ if (!qinfo->RepObjectiveFaction && qinfo->RepObjectiveValue != 0)
{
sLog->outErrorDb("Quest %u has `RepObjectiveValue` = %d but `RepObjectiveFaction` is 0, value has no effect",
qinfo->GetQuestId(), qinfo->RepObjectiveValue);
// warning
}
- if (!qinfo->RepObjectiveFaction2 && qinfo->RepObjectiveValue2 > 0)
+ if (!qinfo->RepObjectiveFaction2 && qinfo->RepObjectiveValue2 != 0)
{
sLog->outErrorDb("Quest %u has `RepObjectiveValue2` = %d but `RepObjectiveFaction2` is 0, value has no effect",
qinfo->GetQuestId(), qinfo->RepObjectiveValue2);
// warning
}
- if (!qinfo->RequiredMinRepFaction && qinfo->RequiredMinRepValue > 0)
+ if (!qinfo->RequiredMinRepFaction && qinfo->RequiredMinRepValue != 0)
{
sLog->outErrorDb("Quest %u has `RequiredMinRepValue` = %d but `RequiredMinRepFaction` is 0, value has no effect",
qinfo->GetQuestId(), qinfo->RequiredMinRepValue);
// warning
}
- if (!qinfo->RequiredMaxRepFaction && qinfo->RequiredMaxRepValue > 0)
+ if (!qinfo->RequiredMaxRepFaction && qinfo->RequiredMaxRepValue != 0)
{
sLog->outErrorDb("Quest %u has `RequiredMaxRepValue` = %d but `RequiredMaxRepFaction` is 0, value has no effect",
qinfo->GetQuestId(), qinfo->RequiredMaxRepValue);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 27ba070be0f..5642df13d8a 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2335,7 +2335,7 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
}
else
{
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
+ sLog->outError("SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
Unit* target = NULL;
if (uint64 guid = m_caster->GetUInt64Value(UNIT_FIELD_TARGET))
target = ObjectAccessor::GetUnit(*m_caster, guid);