This commit is contained in:
ShinDarth committed 2014-10-25 10:00:47 +02:00
1 parent 9e12b969c3
commit 02a107731e
3 files changed
+14 -12

No files matched your search

+2 -2
View File
@@ -15482,7 +15482,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
if (quest->GetRewSpellCast() > 0)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(quest->GetRewSpellCast());
if (questGiver->isType(TYPEMASK_UNIT) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM))
if (questGiver->isType(TYPEMASK_UNIT) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM) && !quest->HasFlag(QUEST_FLAGS_PLAYER_CAST))
{
if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID()))
creature->CastSpell(this, quest->GetRewSpellCast(), true);
@@ -15493,7 +15493,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
else if (quest->GetRewSpell() > 0)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(quest->GetRewSpell());
if (questGiver->isType(TYPEMASK_UNIT) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM))
if (questGiver->isType(TYPEMASK_UNIT) && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM) && !quest->HasFlag(QUEST_FLAGS_PLAYER_CAST))
{
if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID()))
creature->CastSpell(this, quest->GetRewSpell(), true);
+9 -7
View File
@@ -358,13 +358,15 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket& recvData)
TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %s, quest = %u", guid.ToString().c_str(), questId);
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
if (!object || !object->hasInvolvedQuest(questId))
return;
// some kind of WPE protection
if (!_player->CanInteractWithQuestGiver(object))
return;
if (guid != _player->GetGUID())
{
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
if (!object || !object->hasInvolvedQuest(questId))
return;
// some kind of WPE protection
if (!_player->CanInteractWithQuestGiver(object))
return;
}
if (_player->CanCompleteQuest(questId))
_player->CompleteQuest(questId);
+3 -3
View File
@@ -152,9 +152,9 @@ enum QuestFlags
QUEST_FLAGS_OBJ_TEXT = 0x00040000, // use Objective text as Complete text
QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // The client recognizes this flag as auto-accept. However, NONE of the current quests (3.3.5a) have this flag. Maybe blizz used to use it, or will use it in the future.
QUEST_FLAGS_UNK1 = 0x00100000, //
QUEST_FLAGS_AUTO_TAKE = 0x00200000, // Automatically suggestion of accepting quest. Not from npc.
//QUEST_FLAGS_UNK2 = 0x00400000,
//QUEST_FLAGS_UNK3 = 0x00800000, // Found in quest 14069
QUEST_FLAGS_PLAYER_CAST = 0x00200000, // Player cast reward spell on complete
QUEST_FLAGS_UNK2 = 0x00400000,
QUEST_FLAGS_PORTRAIT = 0x00800000, // Portrait in quest log
//QUEST_FLAGS_UNK4 = 0x01000000,
// ... 4.x added flags up to 0x80000000 - all unknown for now
};