From 73e83a469f9a1716e90d7c610e2b39d077b8f1c6 Mon Sep 17 00:00:00 2001 From: Spyder Date: Mon, 24 Dec 2012 21:23:48 +0100 Subject: [PATCH] Core/Spell: Pyroblast effect --- .cproject | 33 +++++---- src/server/game/Spells/SpellEffects.cpp | 76 +++++++++++++++----- src/server/worldserver/worldserver.conf.dist | 64 ++++------------- 3 files changed, 90 insertions(+), 83 deletions(-) diff --git a/.cproject b/.cproject index 89afa787..252fdef6 100644 --- a/.cproject +++ b/.cproject @@ -1,8 +1,8 @@ - - + + @@ -14,20 +14,20 @@ - - - - - - - - + + + + + + + + - - + + - - + + @@ -37,13 +37,16 @@ - + + + + diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 24c5fac4..9bbbfded 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -519,6 +519,7 @@ void Spell::SpellDamageSchoolDmg (SpellEffIndex effIndex) if (unitTarget->GetGUID() == m_caster->GetGUID() || unitTarget->GetTypeId() != TYPEID_PLAYER) return; + float radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[0])); if (!radius) return; @@ -1266,6 +1267,7 @@ void Spell::EffectDummy (SpellEffIndex effIndex) return; } + m_caster->CastSpell(m_caster, spell_id, true); return; } @@ -1345,6 +1347,7 @@ void Spell::EffectDummy (SpellEffIndex effIndex) unitTarget->CastSpell(unitTarget, 44867, true); } + return; } case 44869: // Spectral Blast @@ -1430,6 +1433,7 @@ void Spell::EffectDummy (SpellEffIndex effIndex) break; } + return; } case 48046: // Use Camera @@ -1760,27 +1764,34 @@ void Spell::EffectDummy (SpellEffIndex effIndex) } switch (m_spellInfo->Id) { - case 1459: // Arcane Brilliance - { - if (m_caster->GetTypeId() == TYPEID_PLAYER) - { - std::list PartyMembers; - m_caster->GetPartyMembers(PartyMembers); - bool Continue = false; - uint32 player = 0; - for (std::list::iterator itr = PartyMembers.begin(); itr != PartyMembers.end(); ++itr) // If caster is in party with a player + case 92315: // Pyroblast! + m_caster->RemoveAurasDueToSpell(48108); // Remove hot streak + break; + case 30455: // Ice lance + if (Aura* fof = m_caster->GetAura(44544)) + AddPctN(damage, 25*fof->GetCharges()); + break; + case 1459: // Arcane Brilliance { - ++player; - if (Continue == false && player > 1) - Continue = true; + if (m_caster->GetTypeId() == TYPEID_PLAYER) + { + std::list PartyMembers; + m_caster->GetPartyMembers(PartyMembers); + bool Continue = false; + uint32 player = 0; + for (std::list::iterator itr = PartyMembers.begin(); itr != PartyMembers.end(); ++itr) // If caster is in party with a player + { + ++player; + if (Continue == false && player > 1) + Continue = true; + } + if (Continue == true) + m_caster->CastSpell(unitTarget, 79058, true); // Arcane Brilliance (For all) + else + m_caster->CastSpell(unitTarget, 79057, true); // Arcane Brilliance (Only for caster) } - if (Continue == true) - m_caster->CastSpell(unitTarget, 79058, true); // Arcane Brilliance (For all) - else - m_caster->CastSpell(unitTarget, 79057, true); // Arcane Brilliance (Only for caster) + break; } - break; - } case 42955: // Conjure Refreshment { if (m_caster->getLevel() > 33 && m_caster->getLevel() < 44) @@ -1847,6 +1858,33 @@ void Spell::EffectDummy (SpellEffIndex effIndex) m_caster->CastCustomSpell(unitTarget, 50782, &bp0, NULL, NULL, true, 0); return; } + // Execute + if (m_spellInfo->SpellFamilyFlags[EFFECT_0] & SPELLFAMILYFLAG_WARRIOR_EXECUTE) + { + if (!unitTarget) + return; + + spell_id = 20647; + + int32 rageUsed = std::min(300 - m_powerCost, m_caster->GetPower(POWER_RAGE)); + int32 newRage = std::max(0, m_caster->GetPower(POWER_RAGE) - rageUsed); + + // Sudden Death rage save + if (AuraEffect * aurEff = m_caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_GENERIC, 1989, EFFECT_0)) + { + int32 ragesave = SpellMgr::CalculateSpellEffectAmount(aurEff->GetSpellProto(), EFFECT_1) * 10; + newRage = std::max(newRage, ragesave); + } + + m_caster->SetPower(POWER_RAGE, uint32(newRage)); + + // Glyph of Execution bonus + if (AuraEffect * aurEff = m_caster->GetAuraEffect(58367, EFFECT_0)) + rageUsed += aurEff->GetAmount() * 10; + + bp = damage + int32(rageUsed * m_spellInfo->EffectDamageMultiplier[effIndex] + m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.2f); + break; + } // Concussion Blow if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_WARRIOR_CONCUSSION_BLOW) { @@ -4007,6 +4045,7 @@ void Spell::EffectSummonType (SpellEffIndex effIndex) if (!summon) continue; + if (properties->Category == SUMMON_CATEGORY_ALLY) { summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID()); @@ -5119,6 +5158,7 @@ void Spell::SpellDamageWeaponDmg (SpellEffIndex effIndex) // Annihilation if (AuraEffect const * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 2710, EFFECT_0)) + totalDamagePercentMod *= ((SpellMgr::CalculateSpellEffectAmount(m_spellInfo, EFFECT_2) * unitTarget->GetDiseasesByCaster(m_caster->GetGUID()) / 2.0f) + 100.0f) / 100.0f; break; } diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 2b0c2b8d..36b650ed 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -29,6 +29,8 @@ # CUSTOM SERVER OPTIONS # WINTERGRASP CUSTOM OPTIONS # AUCTIONHOUSE BOT CUSTOM OPTIONS +# IRC CLIENT OPTIONS +# ANTICHEAT CONFIGURATION # ################################################################################################### @@ -3394,57 +3396,48 @@ AuctionHouseBot.DisableTGsAboveReqSkillRank = 0 # ################################################################################################### -############################################################################### -# ArkChat IRC BOT For ArkCore Configuration File ####################### -############################################################################### +################################################################################################### +# IRC CLIENT OPTIONS +# # irc.active # Enable TriniChat Addon # Default: 1 - Enable # 0 - Disable # -############################################################################### + irc.active = 0 -############################################################################### # irc.icc # IRC connect code # Default: 001 - Welcome To Network msg # 375 - Beginning Of MOTD # 376 - End Of MOTD -############################################################################### irc.icc = 001 -############################################################################### # irc.host # IRC server to have TriniChat connect to # -############################################################################### irc.host = "irc.freenode.net" -############################################################################### # irc.port # IRC server port to use -############################################################################### irc.port = "6667" -######################################################################################### # irc.user # The username to have TriniChat use to connect to the IRC server # irc.nick # IRC nickname to be used by the bot # irc.pass # The password to be used to identify to NickServ (IRC NickName Enforcement Services) -######################################################################################### irc.user = "ArkChat" irc.nick = "ArkChat" irc.pass = "" -############################################################################################################################################### # irc.auth # IRC Authentication Method # Default: 0 - Disable @@ -3455,72 +3448,58 @@ irc.pass = "" # irc.auth.nick # IRC Nickname to use if Auth method 2 or 4 is used # -############################################################################################################################################### irc.auth = 1 irc.auth.nick = "ArkChat" -############################################################################### # irc.ldef # Leave a defined IRC channel on server connect # Default: 0 - Disable # 1 - Enable # irc.defchan # IRC channel to leave on server connect if irc.ldef is on -############################################################################### irc.ldef = 1 irc.defchan = "lobby" -############################################################################### # irc.wct # Time to wait before (re)attemptimg connection to IRC server # Default: 30000 - (30 Seconds) # irc.maxattempt # Maximum attempts to try IRC server # Default: 20 -############################################################################### irc.wct = 30000 irc.maxattempt = 255 -############################################################################### # irc.auto.announce # Time to wait in Minutes to announce random messages from database. # Default: 30 - (30 Minutes) -############################################################################### irc.auto.announce = 30 -############################################################################### # irc.autojoin_kick # Autojoin IRC channel if kicked # Default: 1 - Enable # 0 - Disable -############################################################################### irc.autojoin_kick = 1 -############################################################################### # irc.command_prefix # IRC command prefix # Example: (.)online all -############################################################################### irc.command_prefix = "-" -############################################################################### # irc.joinmsg # irc.rstmsg # irc.kickmsg # TriniChat bot join/restart/kick messages -############################################################################### irc.joinmsg = "ArkCORE With ArkChat $Ver Is Up And Running! Command Trigger Is: $Trigger" irc.rstmsg = "Realm Is Restarting, I Will Be Right Back." irc.kickmsg = "Do Not Kick Me Again, Severe Actions Will Be Taken!" -############################################################################################################ # irc.chan_# # wow.chan_# # IRC and WOW channels to link. Leave # out of IRC channel. Both channels _ARE_ case sensitive @@ -3534,7 +3513,6 @@ irc.kickmsg = "Do Not Kick Me Again, Severe Actions Will Be Taken!" # Example: # irc.pass_1 = "password" password for irc channel #1 # irc.pass_2 = "password2" password for irc channel #2 -############################################################################################################ irc.chan_1 = "ARKCHAT" irc.chan_2 = "" @@ -3546,19 +3524,16 @@ wow.chan_1 = "world" wow.chan_2 = "" wow.chan_3 = "" -############################################################################################################ # irc.StatusChannel # Channel Number To Display Status Messages In (AuctionHouse, Levels, Deaths, Etc) # Default: 1 - Channel ID 1 # irc.AnnounceChannel # Channel Number To Display Announcements In (Announces, Notifies, Event) # Default: 1 - Channel ID 1 -############################################################################################################ irc.StatusChannel = 1 irc.AnnounceChannel = 1 -############################################################################################################ # irc.op_gm_login # Op The GM In All Channels The Bot Is On When They Log In To TriniChat # Default: 0 - Disable @@ -3566,12 +3541,10 @@ irc.AnnounceChannel = 1 # irc.op_gm_level # The Minimum GM Level Required To Have The Bot Op The User # Default: 5 - GM Level 5 -############################################################################################################ irc.op_gm_login = 5 irc.op_gm_level = 5 -#################################################################################################################### # irc.ajoin (Experimental/Under Development) # Force players to autojoin a WOW in game channel # Atleast one player must be in the channel on server start, and atleast one person online for invite to work @@ -3579,26 +3552,21 @@ irc.op_gm_level = 5 # 1 - Enable # irc.ajchan # Channel to join if above is Enabled. -#################################################################################################################### irc.ajoin = 1 irc.ajchan = "world" -######################################################################## # irc.online.result # Maximum number of results per line for the online command -######################################################################## irc.online.result = 30 -######################################################################## # chat.*** (Defineable Strings) (maybe more in future) # wow_* - String is displayed in IRC channel # irc_* - String is displayed in WOW channel # Options: $Name, $Level, $Msg, $GM (not all options work in every string) # # DO NO EDIT UNLESS KNOW IRC CODES -######################################################################## chat.wow_irc = "[$Name($Level)] $Msg" chat.irc_wow = "[$Name]: $Msg" @@ -3608,7 +3576,6 @@ chat.leave_wow = "12<<04 $GM$Name Left The $Channel Channel!" chat.leave_irc = "[$Name]: Has Left IRC!" chat.change_nick = "<> $Name Is Now Known As $NewName!" -######################################################################################################################## # Botmask # This defines what the bot announces, if its 0 everything is disabled # simply add the values of the elements you want to create this mask. @@ -3624,11 +3591,9 @@ chat.change_nick = "<> $Name Is Now Known As $NewName!" # (256)Display WoW Announces/Notifies In IRC # (512)Do Not Let Players Use Commands On Higher GM Level Players # (1024)Enable AuctionHouse Announcements !!DISSABLED!! -######################################################################################################################## Botmask = 1023 -######################################################################################################################## # irc.gmlog # Minimum GM level to not show login/pass info in IRC logs # irc.logfile.prefix @@ -3645,7 +3610,6 @@ Botmask = 1023 # (1) Broadcast IRC Commands into logchannel. # (2) Broadcast Ingame GM Commands into logchannel. # (3) Broadcast both IRC Commands and GM Commands into logchannel. -######################################################################################################################## irc.gmlog = 1 irc.logfile.prefix = "IRC_" @@ -3653,19 +3617,15 @@ irc.logchannel = "testlog" irc.logchannelpw = "" irc.logmask = 3 -######################################################################## # irc.fun.games (Experimental/Under Development) -# Enable TriniChat Games +# Enable ArkChat Games # Default: 0 - Disable # 1 - Enable -######################################################################## irc.fun.games = 0 -######################################################################## # irc.gm# # GM tag to append to (GM onjoin / online command) IRC color codes are acceptable -######################################################################## irc.gm1 = "[Moderator]" irc.gm2 = "[Game Master]" @@ -3673,11 +3633,12 @@ irc.gm3 = "[Game Master]" irc.gm4 = "[DevTeam]" irc.gm5 = "[DevTeam]" -######################################################################### -# End Of ArkChat Config File ####################### -######################################################################### +# +################################################################################ ############################################################################### +# ANTICHEAT CONFIGURATION +# # Anticheat.Enable # Description: Enables or disables the Anticheat System functionality # Default: 1 - (Enabled) @@ -3697,3 +3658,6 @@ Anticheat.ReportsForIngameWarnings = 15 # one need to set this if you enable ArkChat AntiCheatWarnChannel = "#GAMEMASTERS" + +# +################################################################################