aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_script_texts.sql2
-rw-r--r--sql/world.sql4
-rw-r--r--src/game/Player.cpp21
-rw-r--r--src/game/SpellAuraDefines.h2
-rw-r--r--src/game/SpellAuras.cpp4
5 files changed, 23 insertions, 10 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql
index ba097629279..94ec7a1bdbc 100644
--- a/sql/FULL/world_script_texts.sql
+++ b/sql/FULL/world_script_texts.sql
@@ -2074,5 +2074,5 @@ INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `
-- Dual Spec `npc_option` change
UPDATE `npc_option` SET `id`=52,`action`=19 WHERE `id`=51 AND `action`=18 AND `option_text`='UNIT_NPC_FLAG_OUTDOORPVP';
-DELETE FROM `npc_option` WHERE `id`=51 AND `action`=16 AND `option_text`='Purchase a Dual Talent Specialization.';
+DELETE FROM `npc_option` WHERE `id`=51;
INSERT INTO `npc_option` (`id`, `gossip_id`, `npcflag`, `icon`, `action`, `box_money`, `coded`, `option_text`, `box_text`) values('51','0','16','0','18','10000000','0','Purchase a Dual Talent Specialization.','Are you sure you wish to purchase a Dual Talent Specialization?');
diff --git a/sql/world.sql b/sql/world.sql
index d8b81c9897f..94d3658aa89 100644
--- a/sql/world.sql
+++ b/sql/world.sql
@@ -1890,7 +1890,9 @@ SET character_set_client = utf8;
CREATE TABLE `npc_spellclick_spells` (
`npc_entry` int(10) unsigned NOT NULL COMMENT 'reference to creature_template',
`spell_id` int(10) unsigned NOT NULL COMMENT 'spell which should be casted ',
- `quest_id` int(10) unsigned NOT NULL COMMENT 'reference to quest_template',
+ `quest_start` mediumint(8) unsigned NOT NULL COMMENT 'reference to quest_template',
+ `quest_start_active` tinyint(1) unsigned NOT NULL default '0',
+ `quest_end` mediumint(8) unsigned NOT NULL default '0',
`cast_flags` tinyint(3) unsigned NOT NULL COMMENT 'first bit defines caster: 1=player, 0=creature; second bit defines target, same mapping as caster bit',
`aura_required` int(11) unsigned NOT NULL default '0' COMMENT 'player without aura cant click',
`aura_forbidden` int(11) unsigned NOT NULL default '0' COMMENT 'player with aura cant click',
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 9450be61f0f..18a5e48e913 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -2430,11 +2430,6 @@ void Player::GiveXP(uint32 xp, Unit* victim)
if(level >= sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
return;
- // handle SPELL_AURA_MOD_XP_PCT auras
- Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_PCT);
- for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
- xp = uint32(xp*(1.0f + (*i)->GetAmount() / 100.0f));
-
// XP resting bonus for kill
uint32 rested_bonus_xp = victim ? GetXPRestBonus(xp) : 0;
@@ -13174,6 +13169,11 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
// Not give XP in case already completed once repeatable quest
uint32 XP = q_status.m_rewarded ? 0 : uint32(pQuest->XPValue( this )*sWorld.getRate(RATE_XP_QUEST));
+ // handle SPELL_AURA_MOD_XP_QUEST_PCT auras
+ Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_QUEST_PCT);
+ for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
+ XP = uint32(XP*(100.0f + (*i)->GetAmount() / 100.0f));
+
if (getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
GiveXP( XP , NULL );
else
@@ -20036,6 +20036,11 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
{
uint32 itr_xp = (member_with_max_level == not_gray_member_with_max_level) ? uint32(xp*rate) : uint32((xp*rate/2)+1);
+ // handle SPELL_AURA_MOD_XP_PCT auras
+ Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_PCT);
+ for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
+ itr_xp = uint32(itr_xp*(100.0f + (*i)->GetAmount() / 100.0f));
+
pGroupGuy->GiveXP(itr_xp, pVictim);
if(Pet* pet = pGroupGuy->GetPet())
pet->GivePetXP(itr_xp/2);
@@ -20064,6 +20069,12 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
if(!PvP)
{
RewardReputation(pVictim,1);
+
+ // handle SPELL_AURA_MOD_XP_PCT auras
+ Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_PCT);
+ for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
+ xp = uint32(xp*(100.0f + (*i)->GetAmount() / 100.0f));
+
GiveXP(xp, pVictim);
if(Pet* pet = GetPet())
diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h
index 1a116173135..715e689d688 100644
--- a/src/game/SpellAuraDefines.h
+++ b/src/game/SpellAuraDefines.h
@@ -336,7 +336,7 @@ enum AuraType
SPELL_AURA_288,
SPELL_AURA_289,
SPELL_AURA_MOD_CRIT_CHANCE,
- SPELL_AURA_291,
+ SPELL_AURA_MOD_XP_QUEST_PCT,
SPELL_AURA_292,
SPELL_AURA_293,
SPELL_AURA_294,
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 77946cf7bba..860cbc1fec0 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -253,7 +253,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleNoImmediateEffect, //197 SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE implemented in Unit::SpellCriticalBonus Unit::GetUnitCriticalChance
&Aura::HandleUnused, //198 unused (3.0.8a) old SPELL_AURA_MOD_ALL_WEAPON_SKILLS
&Aura::HandleNoImmediateEffect, //199 SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT implemented in Unit::MagicSpellHitResult
- &Aura::HandleNoImmediateEffect, //200 SPELL_AURA_MOD_XP_PCT implemented in Player::GiveXP
+ &Aura::HandleNoImmediateEffect, //200 SPELL_AURA_MOD_XP_PCT implemented in Player::RewardPlayerAndGroupAtKill
&Aura::HandleAuraAllowFlight, //201 SPELL_AURA_FLY this aura enable flight mode...
&Aura::HandleNoImmediateEffect, //202 SPELL_AURA_CANNOT_BE_DODGED implemented in Unit::RollPhysicalOutcomeAgainst
&Aura::HandleNoImmediateEffect, //203 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE implemented in Unit::CalculateMeleeDamage and Unit::CalculateSpellDamage
@@ -344,7 +344,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleUnused, //288 unused
&Aura::HandleUnused, //289 unused
&Aura::HandleNULL, //290 mod all critical hit chances?
- &Aura::HandleNULL, //291 SPELL_AURA_MOD_XP_QUEST_PCT
+ &Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_XP_QUEST_PCT implemented in Player::RewardQuest
&Aura::HandleNULL, //292 call stabled pet
&Aura::HandleNULL, //293 2 test spells
&Aura::HandleNULL //294 2 spells, possible prevent mana regen