Finished the first 'Alpha Version' of the Coach feature
This commit is contained in:
+4
-18
@@ -412,14 +412,8 @@
|
||||
return false
|
||||
end
|
||||
|
||||
if (msgType == "CIEA") then --Coach Is Enabled Ask (regular player asked to raid leader)
|
||||
--check if the player that received the msg is the raid leader
|
||||
if (UnitIsGroupLeader("player")) then
|
||||
return
|
||||
end
|
||||
|
||||
--send the answer
|
||||
Details:SendCommMessage(DETAILS_PREFIX_NETWORK, Details:Serialize(DETAILS_PREFIX_COACH, playerName, GetRealmName(), Details.realversion, "CIER", Details.Coach.Server.IsEnabled()), "WHISPER", sourcePlayer)
|
||||
if (msgType == "CIEA") then --Is Coach Enabled Ask (regular player asked to raid leader)
|
||||
Details.Coach.Server.CoachIsEnabled_Answer(sourcePlayer)
|
||||
|
||||
elseif (msgType == "CIER") then --Coach Is Enabled Response (regular player received a raid leader response)
|
||||
local isEnabled = data
|
||||
@@ -444,22 +438,14 @@
|
||||
if (UnitIsGroupLeader("player")) then
|
||||
if (Details.Coach.Server.IsEnabled()) then
|
||||
--update the current combat with new information
|
||||
|
||||
--this is disabled due to lack of testing
|
||||
if (_detalhes.debug) then
|
||||
Details.packFunctions.DeployPackedCombatData(data)
|
||||
end
|
||||
Details.packFunctions.DeployPackedCombatData(data)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (msgType == "CDD") then --Coach Death (a player in the raid sent to raid leader his death log)
|
||||
if (UnitIsGroupLeader("player")) then
|
||||
if (Details.Coach.Server.IsEnabled()) then
|
||||
local currentCombat = Details:GetCurrentCombat()
|
||||
tinsert(currentCombat.last_events_tables, data)
|
||||
|
||||
--tag the misc container as need refresh
|
||||
currentCombat[DETAILS_ATTRIBUTE_MISC].need_refresh = true
|
||||
Details.Coach.Server.AddPlayerDeath(sourcePlayer, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+22
-1
@@ -264,6 +264,9 @@
|
||||
local SPELLID_KYRIAN_DRUID_DAMAGE = 338411
|
||||
local SPELLID_KYRIAN_DRUID_HEAL = 327149
|
||||
local SPELLID_KYRIAN_DRUID_TANK = 327037
|
||||
|
||||
local SPELLID_BARGAST_DEBUFF = 334695
|
||||
local bargastBuffs = {}
|
||||
|
||||
--> spells with special treatment
|
||||
local special_damage_spells = {
|
||||
@@ -718,6 +721,7 @@
|
||||
if (absorbed) then
|
||||
amount = absorbed + (amount or 0)
|
||||
end
|
||||
|
||||
if (_is_in_instance) then
|
||||
if (overkill and overkill > 0) then
|
||||
--if enabled it'll cut the amount of overkill from the last hit (which killed the actor)
|
||||
@@ -725,6 +729,14 @@
|
||||
--amount = amount - overkill
|
||||
end
|
||||
end
|
||||
|
||||
if (bargastBuffs[alvo_serial]) then --REMOVE ON 10.0
|
||||
local stacks = bargastBuffs[alvo_serial]
|
||||
if (stacks) then
|
||||
local newDamage = amount / stacks
|
||||
amount = newDamage
|
||||
end
|
||||
end
|
||||
|
||||
if (este_jogador.grupo and not este_jogador.arena_enemy and not este_jogador.enemy) then --> source = friendly player and not an enemy player
|
||||
--dano to adversario estava caindo aqui por nao estar checando .enemy
|
||||
@@ -2134,8 +2146,12 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
|
||||
reflection_debuffs[who_serial][spellid] = true
|
||||
end
|
||||
|
||||
if (spellid == SPELLID_BARGAST_DEBUFF) then --REMOVE ON 10.0
|
||||
bargastBuffs[alvo_serial] = (bargastBuffs[alvo_serial] or 0) + 1
|
||||
end
|
||||
|
||||
if (_in_combat) then
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> buff uptime
|
||||
if (_recording_buffs_and_debuffs) then
|
||||
@@ -2387,6 +2403,10 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
|
||||
who_serial, who_name, who_flags = "", enemyName, 0xa48
|
||||
end
|
||||
|
||||
if (spellid == SPELLID_BARGAST_DEBUFF) then
|
||||
bargastBuffs[alvo_serial] = (bargastBuffs[alvo_serial] or 0) + 1
|
||||
end
|
||||
|
||||
if (_in_combat) then
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> buff uptime
|
||||
@@ -4645,6 +4665,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_detalhes:SendEvent ("COMBAT_ENCOUNTER_END", nil, ...)
|
||||
|
||||
_table_wipe (_detalhes.encounter_table)
|
||||
_table_wipe (bargastBuffs)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user