Merge commit 'dbaf88566be7083408fb8324d7886dc3e0a45cc0' into 4.3.4
Conflicts: .gitattributes CONTRIBUTING.md sql/updates/world/2015_05_11_04_world.sql sql/updates/world/2015_05_27_00_world.sql sql/updates/world/2015_05_27_01_world.sql sql/updates/world/2015_06_06_01_world_335.sql src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp src/server/game/Entities/Creature/Creature.cpp src/server/game/Entities/Creature/Creature.h src/server/game/Entities/Object/ObjectGuid.h src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Player/Player.h src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Unit/Unit.h src/server/game/Spells/Auras/SpellAuras.cpp src/server/game/Spells/Spell.cpp src/server/game/Spells/SpellMgr.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/Kalimdor/zone_moonglade.cpp src/server/scripts/Spells/spell_hunter.cpp src/server/scripts/Spells/spell_item.cpp src/server/scripts/Spells/spell_rogue.cpp
This commit is contained in:
commit
6dfaec3d97
119 files changed
+3776
-2162
No files matched your search
@@ -53,6 +53,7 @@ EndContentData */
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Pet.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
@@ -1208,14 +1209,14 @@ public:
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->HasSpellCooldown(SPELL_INT) ||
|
||||
player->HasSpellCooldown(SPELL_ARM) ||
|
||||
player->HasSpellCooldown(SPELL_DMG) ||
|
||||
player->HasSpellCooldown(SPELL_RES) ||
|
||||
player->HasSpellCooldown(SPELL_STR) ||
|
||||
player->HasSpellCooldown(SPELL_AGI) ||
|
||||
player->HasSpellCooldown(SPELL_STM) ||
|
||||
player->HasSpellCooldown(SPELL_SPI))
|
||||
if (player->GetSpellHistory()->HasCooldown(SPELL_INT) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_ARM) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_DMG) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_RES) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_STR) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_AGI) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_STM) ||
|
||||
player->GetSpellHistory()->HasCooldown(SPELL_SPI))
|
||||
player->SEND_GOSSIP_MENU(7393, creature->GetGUID());
|
||||
else
|
||||
{
|
||||
@@ -1275,52 +1276,44 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
uint32 spellId = 0;
|
||||
switch (sender)
|
||||
{
|
||||
case GOSSIP_SENDER_MAIN:
|
||||
SendAction(player, creature, action);
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 1:
|
||||
creature->CastSpell(player, SPELL_DMG, false);
|
||||
player->AddSpellCooldown(SPELL_DMG, 0, time(NULL) + 7200);
|
||||
SendAction(player, creature, action);
|
||||
spellId = SPELL_DMG;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 2:
|
||||
creature->CastSpell(player, SPELL_RES, false);
|
||||
player->AddSpellCooldown(SPELL_RES, 0, time(NULL) + 7200);
|
||||
SendAction(player, creature, action);
|
||||
spellId = SPELL_RES;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 3:
|
||||
creature->CastSpell(player, SPELL_ARM, false);
|
||||
player->AddSpellCooldown(SPELL_ARM, 0, time(NULL) + 7200);
|
||||
SendAction(player, creature, action);
|
||||
spellId = SPELL_ARM;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 4:
|
||||
creature->CastSpell(player, SPELL_SPI, false);
|
||||
player->AddSpellCooldown(SPELL_SPI, 0, time(NULL) + 7200);
|
||||
SendAction(player, creature, action);
|
||||
spellId = SPELL_SPI;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 5:
|
||||
creature->CastSpell(player, SPELL_INT, false);
|
||||
player->AddSpellCooldown(SPELL_INT, 0, time(NULL) + 7200);
|
||||
SendAction(player, creature, action);
|
||||
spellId = SPELL_INT;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 6:
|
||||
creature->CastSpell(player, SPELL_STM, false);
|
||||
player->AddSpellCooldown(SPELL_STM, 0, time(NULL) + 7200);
|
||||
SendAction(player, creature, action);
|
||||
spellId = SPELL_STM;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 7:
|
||||
creature->CastSpell(player, SPELL_STR, false);
|
||||
player->AddSpellCooldown(SPELL_STR, 0, time(NULL) + 7200);
|
||||
SendAction(player, creature, action);
|
||||
spellId = SPELL_STR;
|
||||
break;
|
||||
case GOSSIP_SENDER_MAIN + 8:
|
||||
creature->CastSpell(player, SPELL_AGI, false);
|
||||
player->AddSpellCooldown(SPELL_AGI, 0, time(NULL) + 7200);
|
||||
SendAction(player, creature, action);
|
||||
spellId = SPELL_AGI;
|
||||
break;
|
||||
}
|
||||
|
||||
if (spellId)
|
||||
{
|
||||
creature->CastSpell(player, spellId, false);
|
||||
player->GetSpellHistory()->AddCooldown(spellId, 0, std::chrono::hours(2));
|
||||
SendAction(player, creature, action);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user