Added the baseline for the Coach Mode feature

- Added the command '/details coach' to  enabled coach mode, need to be raid leader and all members must have details up to date.
- Fixed Tiny Threat not showing threat.
- Fixed annoucement interrupt toggle enable was reseting on logon.
- Added container_spells:GetOrCreateSpell(id, shouldCreate, token)
- Added Details:GetRaidLeader(), return the RL name.
- Framework update.
This commit is contained in:
Tercio Jose
2020-11-03 20:55:19 -03:00
parent 262f115114
commit 93a7a8cc69
15 changed files with 1587 additions and 35 deletions
+10 -2
View File
@@ -608,13 +608,13 @@ end
if (not self.iniciada) then
self:RestauraJanela (self.meu_id, nil, true) --parece que esta chamando o ativar instance denovo... passei true no load_only vamos ver o resultado
--tiny threat parou de funcionar depois de /reload depois dessa mudança, talvez tenha algo para carregar ainda
self.iniciada = true
else
_detalhes.opened_windows = _detalhes.opened_windows+1
end
self:ChangeSkin() --carrega a skin aqui que era antes feito dentro do restaura janela
_detalhes:TrocaTabela (self, nil, nil, nil, true)
if (self.hide_icon) then
@@ -634,7 +634,7 @@ end
if (not temp) then
if (self.modo == modo_raid) then
_detalhes.RaidTables:EnableRaidMode (self)
_detalhes.RaidTables:EnableRaidMode(self)
elseif (self.modo == modo_alone) then
self:SoloMode (true)
@@ -656,6 +656,14 @@ end
if (not temp and not _detalhes.initializing) then
_detalhes:SendEvent ("DETAILS_INSTANCE_OPEN", nil, self)
end
if (self.modo == modo_raid) then
_detalhes.RaidTables:EnableRaidMode(self)
elseif (self.modo == modo_alone) then
self:SoloMode (true)
end
end
------------------------------------------------------------------------------------------------------------------------
+3 -4
View File
@@ -27,8 +27,7 @@
local GetNumDeclensionSets = _G.GetNumDeclensionSets
local DeclineName = _G.DeclineName
local GetLocale = _G.GetLocale
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -438,7 +437,7 @@
--if the user client is in russian language
--make an attempt to remove declensions from the character's name
--this is equivalent to remove 's from the owner on enUS
if (GetLocale() == "ruRU") then
if (CONST_CLIENT_LANGUAGE == "ruRU") then
if (find_name_declension (text1, playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
else
@@ -462,7 +461,7 @@
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
if (GetLocale() == "ruRU") then
if (CONST_CLIENT_LANGUAGE == "ruRU") then
if (find_name_declension (text2, playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
else
+6 -2
View File
@@ -59,7 +59,11 @@ local _
return pairs (self._ActorTable)
end
function container_habilidades:PegaHabilidade (id, criar, token, cria_shadow)
function container_habilidades:GetOrCreateSpell(id, shouldCreate, token)
return self:PegaHabilidade (id, shouldCreate, token)
end
function container_habilidades:PegaHabilidade (id, criar, token)
local esta_habilidade = self._ActorTable [id]
@@ -68,7 +72,7 @@ local _
else
if (criar) then
local novo_objeto = self.funcao_de_criacao (nil, id, shadow_objeto, token)
local novo_objeto = self.funcao_de_criacao (nil, id, nil, token)
self._ActorTable [id] = novo_objeto