mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[8135] Cast quest rewarded spells after mark spell as completed.
Some spell have spell_area requirement for cast (for later re-apply)
This commit is contained in:
parent
ef6b3f978d
commit
5d8bd14d38
2 changed files with 30 additions and 28 deletions
|
|
@ -12578,11 +12578,6 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
|
||||||
|
|
||||||
RewardReputation( pQuest );
|
RewardReputation( pQuest );
|
||||||
|
|
||||||
if( pQuest->GetRewSpellCast() > 0 )
|
|
||||||
CastSpell( this, pQuest->GetRewSpellCast(), true);
|
|
||||||
else if( pQuest->GetRewSpell() > 0)
|
|
||||||
CastSpell( this, pQuest->GetRewSpell(), true);
|
|
||||||
|
|
||||||
uint16 log_slot = FindQuestSlot( quest_id );
|
uint16 log_slot = FindQuestSlot( quest_id );
|
||||||
if (log_slot < MAX_QUEST_LOG_SIZE)
|
if (log_slot < MAX_QUEST_LOG_SIZE)
|
||||||
SetQuestSlot(log_slot,0);
|
SetQuestSlot(log_slot,0);
|
||||||
|
|
@ -12691,11 +12686,18 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
|
||||||
SetQuestStatus(quest_id, QUEST_STATUS_NONE);
|
SetQuestStatus(quest_id, QUEST_STATUS_NONE);
|
||||||
|
|
||||||
q_status.m_rewarded = true;
|
q_status.m_rewarded = true;
|
||||||
|
if (q_status.uState != QUEST_NEW)
|
||||||
|
q_status.uState = QUEST_CHANGED;
|
||||||
|
|
||||||
if (announce)
|
if (announce)
|
||||||
SendQuestReward( pQuest, XP, questGiver );
|
SendQuestReward( pQuest, XP, questGiver );
|
||||||
|
|
||||||
if (q_status.uState != QUEST_NEW) q_status.uState = QUEST_CHANGED;
|
// cast spells after mark quest complete (some spells have quest completed state reqyurements in spell_area data)
|
||||||
|
if (pQuest->GetRewSpellCast() > 0)
|
||||||
|
CastSpell( this, pQuest->GetRewSpellCast(), true);
|
||||||
|
else if ( pQuest->GetRewSpell() > 0)
|
||||||
|
CastSpell( this, pQuest->GetRewSpell(), true);
|
||||||
|
|
||||||
if (pQuest->GetZoneOrSort() > 0)
|
if (pQuest->GetZoneOrSort() > 0)
|
||||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE, pQuest->GetZoneOrSort());
|
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE, pQuest->GetZoneOrSort());
|
||||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT);
|
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8134"
|
#define REVISION_NR "8135"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue