- arena support improvements.

This commit is contained in:
Tercio
2015-08-25 13:57:54 -03:00
parent 583fb84645
commit 47dda54c2e
7 changed files with 31 additions and 23 deletions
+1
View File
@@ -860,6 +860,7 @@
new_actor.role = actor.role
new_actor.arena_enemy = actor.arena_enemy
new_actor.arena_ally = actor.arena_ally
new_actor.arena_team = actor.arena_team
if (actor.id) then
new_actor.id = actor.id
+8 -6
View File
@@ -301,18 +301,20 @@
elseif (actor.owner) then
return _unpack (_detalhes.class_colors [actor.owner.classe])
elseif (actor.arena_enemy) then
return _unpack (_detalhes.class_colors.ARENA_ENEMY)
elseif (actor.arena_ally) then
return _unpack (_detalhes.class_colors.ARENA_ALLY)
elseif (actor.arena_team) then
if (actor.arena_team == 0) then
return _unpack (_detalhes.class_colors.ARENA_GREEN)
else
return _unpack (_detalhes.class_colors.ARENA_YELLOW)
end
else
if (not is_player_class [actor.classe] and actor.flag_original and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
return _unpack (_detalhes.class_colors.NEUTRAL)
else
return _unpack (_detalhes.class_colors [actor.classe])
end
end
end
+4 -2
View File
@@ -192,12 +192,14 @@
if (_detalhes.is_in_arena) then
local my_team_color = GetBattlefieldArenaFaction()
if (novo_objeto.grupo) then --> is ally
novo_objeto.arena_ally = true
novo_objeto.arena_team = my_team_color
else --> is enemy
novo_objeto.arena_enemy = true
novo_objeto.arena_team = 1 - my_team_color
end
local arena_props = _detalhes.arena_table [nome]