Merge branch 'feature/chascore-donner-des-noms-standards-aux-barres-de-ressource+CI-LIN64' into 'develop'

Changed all HP, Sap, Stamina and Focus occurences to ChaScoreX

Issue #5 :

Changed all HP (or similar) occurences to ChaScore1 (or cha_score1).
Changed all Stamina (or similar) occurences to ChaScore2 (or cha_score2).
Changed all Sap occurences to ChaScore3 (or cha_score3).
Changed all Focus (or similar) occurences to ChaScore4 (or cha_score4).

See merge request !17
This commit is contained in:
Dremor 2016-05-23 18:22:24 +00:00
commit c58e1a3506
235 changed files with 4382 additions and 4619 deletions

View file

@ -3,30 +3,30 @@ db SERVER:INTERFACES:FLAGS 255
db SERVER:CHARACTER_INFO:SCORES:MaxHitPoints 100
db SERVER:CHARACTER_INFO:SCORES:BaseHitPoints 120
db SERVER:CHARACTER_INFO:SCORES:MaxStamina 120
db SERVER:CHARACTER_INFO:SCORES:BaseStamina 100
db SERVER:CHARACTER_INFO:SCORES:MaxSap 100
db SERVER:CHARACTER_INFO:SCORES:BaseSap 100
db SERVER:CHARACTER_INFO:SCORES:MaxFocus 100
db SERVER:CHARACTER_INFO:SCORES:BaseFocus 100
db SERVER:CHARACTER_INFO:SCORES:MaxChaScore1 100
db SERVER:CHARACTER_INFO:SCORES:BaseChaScore1 120
db SERVER:CHARACTER_INFO:SCORES:MaxChaScore2 120
db SERVER:CHARACTER_INFO:SCORES:BaseChaScore2 100
db SERVER:CHARACTER_INFO:SCORES:MaxChaScore3 100
db SERVER:CHARACTER_INFO:SCORES:BaseChaScore3 100
db SERVER:CHARACTER_INFO:SCORES:MaxChaScore4 100
db SERVER:CHARACTER_INFO:SCORES:BaseChaScore4 100
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Constitution 33
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Metabolism 100
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Strength 50
db SERVER:CHARACTER_INFO:CHARACTERISTICS:WellBalanced 30
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Intelligence 30
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Wisdom 420
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Dexterity 121
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Will 654
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha1 33
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha1Reg 100
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha2 50
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha2Reg 30
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha3 30
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha3Reg 420
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha4 121
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha4Reg 654
db SERVER:USER:SKILL_POINTS 1000
db SERVER:TARGET:BARS:HP 80
db SERVER:TARGET:BARS:STA 32
db SERVER:TARGET:BARS:SAP 69
db SERVER:TARGET:BARS:FOCUS 95
db SERVER:TARGET:BARS:ChaScore1 80
db SERVER:TARGET:BARS:ChaScore2 32
db SERVER:TARGET:BARS:ChaScore3 69
db SERVER:TARGET:BARS:ChaScore4 95
@ -347,25 +347,25 @@ db SERVER:STATIC_DATA:BAG_BULK_MAX 400
db SERVER:PACK_ANIMAL:BEAST0:STATUS 15
db SERVER:PACK_ANIMAL:BEAST0:TYPE 2
db SERVER:PACK_ANIMAL:BEAST0:UID 2
db SERVER:PACK_ANIMAL:BEAST0:HP 40
db SERVER:PACK_ANIMAL:BEAST0:ChaScore1 40
db SERVER:PACK_ANIMAL:BEAST0:BULK_MAX 200
db SERVER:PACK_ANIMAL:BEAST1:STATUS 15
db SERVER:PACK_ANIMAL:BEAST1:TYPE 1
db SERVER:PACK_ANIMAL:BEAST1:UID 3
db SERVER:PACK_ANIMAL:BEAST1:HP 0
db SERVER:PACK_ANIMAL:BEAST1:ChaScore1 0
db SERVER:PACK_ANIMAL:BEAST1:BULK_MAX 300
db SERVER:PACK_ANIMAL:BEAST2:STATUS 15
db SERVER:PACK_ANIMAL:BEAST2:TYPE 2
db SERVER:PACK_ANIMAL:BEAST2:UID 4
db SERVER:PACK_ANIMAL:BEAST2:HP 0
db SERVER:PACK_ANIMAL:BEAST2:ChaScore1 0
db SERVER:PACK_ANIMAL:BEAST2:BULK_MAX 300
db SERVER:PACK_ANIMAL:BEAST3:STATUS 15
db SERVER:PACK_ANIMAL:BEAST3:TYPE 2
db SERVER:PACK_ANIMAL:BEAST3:UID 1
db SERVER:PACK_ANIMAL:BEAST3:HP 30
db SERVER:PACK_ANIMAL:BEAST3:ChaScore1 30
db SERVER:PACK_ANIMAL:BEAST3:BULK_MAX 100

View file

@ -1,17 +1,17 @@
db SERVER:USER:HP_MAX 100
db SERVER:USER:HP 45
db SERVER:USER:STA_MAX 100
db SERVER:USER:STA 70
db SERVER:USER:SAP_MAX 100
db SERVER:USER:SAP 90
db SERVER:USER:ChaScore1_MAX 100
db SERVER:USER:ChaScore1 45
db SERVER:USER:ChaScore2_MAX 100
db SERVER:USER:ChaScore2 70
db SERVER:USER:ChaScore3_MAX 100
db SERVER:USER:chaScore3 90
db SERVER:USER:ACT_MAX 9
db SERVER:USER:ACT 2
db SERVER:TARGET:HP_MAX 100
db SERVER:TARGET:HP 80
db SERVER:TARGET:STA_MAX 100
db SERVER:TARGET:STA 32
db SERVER:TARGET:SAP_MAX 100
db SERVER:TARGET:SAP 69
db SERVER:TARGET:ChaScore1_MAX 100
db SERVER:TARGET:ChaScore1 80
db SERVER:TARGET:ChaScore2_MAX 100
db SERVER:TARGET:ChaScore2 32
db SERVER:TARGET:ChaScore3_MAX 100
db SERVER:TARGET:ChaScore3 69
// db SERVER:INVENTORY:1:0:SHEET 123648
// db SERVER:INVENTORY:2:0:SHEET 137472
// db SERVER:INVENTORY:2:1:SHEET 232960

View file

@ -14,24 +14,24 @@ db SERVER:MODIFIERS:BONUS:7:SHEET 1572
db SERVER:MODIFIERS:MALUS:0:SHEET 1572
db SERVER:MODIFIERS:MALUS:1:SHEET 1572
db SERVER:MODIFIERS:MALUS:2:SHEET 1572
db SERVER:CHARACTER_INFO:SCORES:Sap 10
db SERVER:CHARACTER_INFO:SCORES:MaxSap 100
db SERVER:CHARACTER_INFO:SCORES:MaxSapStatus 1
db SERVER:CHARACTER_INFO:SCORES:Stamina 25
db SERVER:CHARACTER_INFO:SCORES:MaxStamina 110
db SERVER:CHARACTER_INFO:SCORES:MaxStaminaStatus 2
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Strength 30
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxStrengthStatus 0
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Constitution 90
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxConstitutionStatus 1
db SERVER:CHARACTER_INFO:SCORES:ChaScore3 10
db SERVER:CHARACTER_INFO:SCORES:MaxChaScore3 100
db SERVER:CHARACTER_INFO:SCORES:MaxChaScore3Status 1
db SERVER:CHARACTER_INFO:SCORES:ChaScore2 25
db SERVER:CHARACTER_INFO:SCORES:MaxChaScore2 110
db SERVER:CHARACTER_INFO:SCORES:MaxChaScore2Status 2
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha2 30
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxCha2Status 0
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha1 90
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxCha1Status 1
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Agility 60
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxAgilityStatus 2
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Will 45
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxWillStatus 0
db SERVER:CHARACTER_INFO:CHARACTERISTICS:WellBalanced 65
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxWellBalancedStatus 2
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Intelligence 33
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxIntelligenceStatus 0
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha2Reg 65
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxCha2RegStatus 2
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Cha3 33
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxCha3Status 0
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Charisme 10
db SERVER:CHARACTER_INFO:CHARACTERISTICS:MaxCharismeStatus 1
db SERVER:CHARACTER_INFO:CHARACTERISTICS:Empathie 62

View file

@ -264,16 +264,16 @@
<variable entry="UI:SAVE:INSCENE:USER:GUILD_NAME"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:USER:HP"
<variable entry="UI:SAVE:INSCENE:USER:ChaScore1"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:USER:STA"
<variable entry="UI:SAVE:INSCENE:USER:ChaScore2"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:USER:SAP"
<variable entry="UI:SAVE:INSCENE:USER:ChaScore3"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:USER:FOCUS"
<variable entry="UI:SAVE:INSCENE:USER:ChaScore4"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:USER:ACTION"
@ -300,16 +300,16 @@
<variable entry="UI:SAVE:INSCENE:FRIEND:GUILD_NAME"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:FRIEND:HP"
<variable entry="UI:SAVE:INSCENE:FRIEND:ChaScore1"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:FRIEND:STA"
<variable entry="UI:SAVE:INSCENE:FRIEND:ChaScore2"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:FRIEND:SAP"
<variable entry="UI:SAVE:INSCENE:FRIEND:ChaScore3"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:FRIEND:FOCUS"
<variable entry="UI:SAVE:INSCENE:FRIEND:ChaScore4"
type="bool"
value="false" />
<variable entry="UI:SAVE:INSCENE:FRIEND:MESSAGES"
@ -345,7 +345,7 @@
<variable entry="UI:SAVE:INSCENE:ENEMY:GUILD_NAME"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:ENEMY:HP"
<variable entry="UI:SAVE:INSCENE:ENEMY:ChaScore1"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:ENEMY:MESSAGES"
@ -357,16 +357,16 @@
<variable entry="UI:SAVE:INSCENE:SOURCE:NAME"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:SOURCE:HP"
<variable entry="UI:SAVE:INSCENE:SOURCE:ChaScore1"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:SOURCE:STA"
<variable entry="UI:SAVE:INSCENE:SOURCE:ChaScore2"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:SOURCE:SAP"
<variable entry="UI:SAVE:INSCENE:SOURCE:ChaScore3"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:SOURCE:FOCUS"
<variable entry="UI:SAVE:INSCENE:SOURCE:ChaScore4"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:SOURCE:ACTION"
@ -2111,76 +2111,76 @@ This MUST follow the Enum MISSION_DESC::TIconId
<define id="win_priority_highest"
value="5" />
<!-- For bars, -1024 to +1024 "percent" values from CBarManager -->
<define id="player_hp_percent"
value="UI:VARIABLES:USER:HP_RATIO" />
<define id="player_sta_percent"
value="UI:VARIABLES:USER:STA_RATIO" />
<define id="player_sap_percent"
value="UI:VARIABLES:USER:SAP_RATIO" />
<define id="player_focus_percent"
value="UI:VARIABLES:USER:FOCUS_RATIO" />
<define id="player_ChaScore1_percent"
value="UI:VARIABLES:USER:ChaScore1_RATIO" />
<define id="player_ChaScore2_percent"
value="UI:VARIABLES:USER:ChaScore2_RATIO" />
<define id="player_ChaScore3_percent"
value="UI:VARIABLES:USER:ChaScore3_RATIO" />
<define id="player_ChaScore4_percent"
value="UI:VARIABLES:USER:ChaScore4_RATIO" />
<define id="player_percent_max"
value="1024" />
<!-- For character sheet numerical values from database -->
<define id="player_hp"
value="UI:VARIABLES:USER:HP" />
<define id="player_ChaScore1"
value="UI:VARIABLES:USER:ChaScore1" />
<!-- Local because sent by impulse -->
<define id="player_hp_max"
<define id="player_ChaScore1_max"
value="SERVER:CHARACTER_INFO:SCORES0:Max" />
<define id="player_hp_base"
<define id="player_ChaScore1_base"
value="SERVER:CHARACTER_INFO:SCORES0:Base" />
<define id="player_sta"
value="UI:VARIABLES:USER:STA" />
<define id="player_ChaScore2"
value="UI:VARIABLES:USER:ChaScore2" />
<!-- Local because sent by impulse -->
<define id="player_sta_max"
<define id="player_ChaScore2_max"
value="SERVER:CHARACTER_INFO:SCORES1:Max" />
<define id="player_sta_base"
<define id="player_ChaScore2_base"
value="SERVER:CHARACTER_INFO:SCORES1:Base" />
<define id="player_sap"
value="UI:VARIABLES:USER:SAP" />
<define id="player_ChaScore3"
value="UI:VARIABLES:USER:ChaScore3" />
<!-- Local because sent by impulse -->
<define id="player_sap_max"
<define id="player_ChaScore3_max"
value="SERVER:CHARACTER_INFO:SCORES2:Max" />
<define id="player_sap_base"
<define id="player_ChaScore3_base"
value="SERVER:CHARACTER_INFO:SCORES2:Base" />
<define id="player_focus"
value="UI:VARIABLES:USER:FOCUS" />
<define id="player_ChaScore4"
value="UI:VARIABLES:USER:ChaScore4" />
<!-- Local because sent by impulse -->
<define id="player_focus_max"
<define id="player_ChaScore4_max"
value="SERVER:CHARACTER_INFO:SCORES3:Max" />
<define id="player_focus_base"
<define id="player_ChaScore4_base"
value="SERVER:CHARACTER_INFO:SCORES3:Base" />
<define id="player_hpreg"
<define id="player_ChaScore1reg"
value="SERVER:CHARACTER_INFO:SCORES0:Regen" />
<define id="player_hpreg_base"
<define id="player_ChaScore1reg_base"
value="SERVER:CHARACTER_INFO:SCORES0:BaseRegen" />
<define id="player_stareg"
<define id="player_ChaScore2reg"
value="SERVER:CHARACTER_INFO:SCORES1:Regen" />
<define id="player_stareg_base"
<define id="player_ChaScore2reg_base"
value="SERVER:CHARACTER_INFO:SCORES1:BaseRegen" />
<define id="player_sapreg"
<define id="player_ChaScore3reg"
value="SERVER:CHARACTER_INFO:SCORES2:Regen" />
<define id="player_sapreg_base"
<define id="player_ChaScore3reg_base"
value="SERVER:CHARACTER_INFO:SCORES2:BaseRegen" />
<define id="player_focreg"
<define id="player_ChaScore4reg"
value="SERVER:CHARACTER_INFO:SCORES3:Regen" />
<define id="player_focreg_base"
<define id="player_ChaScore4reg_base"
value="SERVER:CHARACTER_INFO:SCORES3:BaseRegen" />
<define id="player_carac_hpmax"
<define id="player_carac_ChaScore1max"
value="SERVER:CHARACTER_INFO:CHARACTERISTICS0:VALUE" />
<define id="player_carac_hpreg"
<define id="player_carac_ChaScore1reg"
value="SERVER:CHARACTER_INFO:CHARACTERISTICS1:VALUE" />
<define id="player_carac_sapmax"
<define id="player_carac_ChaScore3max"
value="SERVER:CHARACTER_INFO:CHARACTERISTICS2:VALUE" />
<define id="player_carac_sapreg"
<define id="player_carac_ChaScore3reg"
value="SERVER:CHARACTER_INFO:CHARACTERISTICS3:VALUE" />
<define id="player_carac_stamax"
<define id="player_carac_ChaScore2max"
value="SERVER:CHARACTER_INFO:CHARACTERISTICS4:VALUE" />
<define id="player_carac_stareg"
<define id="player_carac_ChaScore2reg"
value="SERVER:CHARACTER_INFO:CHARACTERISTICS5:VALUE" />
<define id="player_carac_wishmax"
<define id="player_carac_ChaScore4max"
value="SERVER:CHARACTER_INFO:CHARACTERISTICS6:VALUE" />
<define id="player_carac_wishreg"
<define id="player_carac_ChaScore4reg"
value="SERVER:CHARACTER_INFO:CHARACTERISTICS7:VALUE" />
<define id="player_protect_acid"
value="SERVER:CHARACTER_INFO:MAGIC_PROTECTION:0:VALUE" />
@ -2923,13 +2923,13 @@ This MUST follow the Enum MISSION_DESC::TIconId
<!-- ************************** -->
<!-- * PLAYER JAUGES DISPLAY * -->
<!-- ************************** -->
<variable entry="UI:SAVE:PLAYER:DISP_SAP"
<variable entry="UI:SAVE:PLAYER:DISP_ChaScore3"
type="sint32"
value="1" />
<variable entry="UI:SAVE:PLAYER:DISP_STA"
<variable entry="UI:SAVE:PLAYER:DISP_ChaScore2"
type="sint32"
value="1" />
<variable entry="UI:SAVE:PLAYER:DISP_FOC"
<variable entry="UI:SAVE:PLAYER:DISP_ChaScore4"
type="sint32"
value="1" />
<!-- If player wants the Current Action window out of the player window -->
@ -3464,15 +3464,15 @@ This MUST follow the Enum MISSION_DESC::TIconId
<!-- ***************************** -->
<!-- * COMMON DEFINE COLORS * -->
<!-- ***************************** -->
<define id="hp_color"
<define id="ChaScore1_color"
value="255 64 0 255" />
<define id="hp_color_neg"
<define id="ChaScore1_color_neg"
value="127 32 0 255" />
<define id="sta_color"
<define id="ChaScore2_color"
value="255 0 255 255" />
<define id="sap_color"
<define id="ChaScore3_color"
value="72 255 0 255" />
<define id="focus_color"
<define id="ChaScore4_color"
value="0 128 255 255" />
<define id="bulk_color"
value="215 185 75 255" />
@ -3749,69 +3749,69 @@ This MUST follow the Enum MISSION_DESC::TIconId
value_from_code="getMaxTeamMember()" />
<define id="max_fame_tribe"
value_from_code="lua:getNbTribeFameIndex()" />
<!-- Team Members (FOCUS not setuped) -->
<variable entry="UI:VARIABLES:BARS:TEAM:$i:HP"
<!-- Team Members (ChaScore4 not setuped) -->
<variable entry="UI:VARIABLES:BARS:TEAM:$i:ChaScore1"
type="sint32"
value="0"
size="%max_team_member" />
<variable entry="UI:VARIABLES:BARS:TEAM:$i:STA"
<variable entry="UI:VARIABLES:BARS:TEAM:$i:ChaScore2"
type="sint32"
value="0"
size="%max_team_member" />
<variable entry="UI:VARIABLES:BARS:TEAM:$i:SAP"
<variable entry="UI:VARIABLES:BARS:TEAM:$i:ChaScore3"
type="sint32"
value="0"
size="%max_team_member" />
<!-- Animal (only HP) -->
<variable entry="UI:VARIABLES:BARS:ANIMAL:$i:HP"
<!-- Animal (only ChaScore1) -->
<variable entry="UI:VARIABLES:BARS:ANIMAL:$i:ChaScore1"
type="sint32"
value="0"
size="%max_animal" />
<!-- Target -->
<variable entry="UI:VARIABLES:BARS:TARGET:HP"
<variable entry="UI:VARIABLES:BARS:TARGET:ChaScore1"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:BARS:TARGET:STA"
<variable entry="UI:VARIABLES:BARS:TARGET:ChaScore2"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:BARS:TARGET:SAP"
<variable entry="UI:VARIABLES:BARS:TARGET:ChaScore3"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:BARS:TARGET:FOCUS"
<variable entry="UI:VARIABLES:BARS:TARGET:ChaScore4"
type="sint32"
value="0" />
<define id="target_hp"
value="UI:VARIABLES:BARS:TARGET:HP" />
<define id="target_sta"
value="UI:VARIABLES:BARS:TARGET:STA" />
<define id="target_sap"
value="UI:VARIABLES:BARS:TARGET:SAP" />
<define id="target_focus"
value="UI:VARIABLES:BARS:TARGET:FOCUS" />
<define id="target_ChaScore1"
value="UI:VARIABLES:BARS:TARGET:ChaScore1" />
<define id="target_ChaScore2"
value="UI:VARIABLES:BARS:TARGET:ChaScore2" />
<define id="target_ChaScore3"
value="UI:VARIABLES:BARS:TARGET:ChaScore3" />
<define id="target_ChaScore4"
value="UI:VARIABLES:BARS:TARGET:ChaScore4" />
<!-- Special USER. -1024 to +1024 "percent" values -->
<variable entry="UI:VARIABLES:USER:HP_RATIO"
<variable entry="UI:VARIABLES:USER:ChaScore1_RATIO"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:USER:STA_RATIO"
<variable entry="UI:VARIABLES:USER:ChaScore2_RATIO"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:USER:SAP_RATIO"
<variable entry="UI:VARIABLES:USER:ChaScore3_RATIO"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:USER:FOCUS_RATIO"
<variable entry="UI:VARIABLES:USER:ChaScore4_RATIO"
type="sint32"
value="0" />
<!-- Special USER: Actual 0 to 32767 "real clamped to 0" values -->
<variable entry="UI:VARIABLES:USER:HP"
<variable entry="UI:VARIABLES:USER:ChaScore1"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:USER:STA"
<variable entry="UI:VARIABLES:USER:ChaScore2"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:USER:SAP"
<variable entry="UI:VARIABLES:USER:ChaScore3"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:USER:FOCUS"
<variable entry="UI:VARIABLES:USER:ChaScore4"
type="sint32"
value="0" />
<!-- AH when Target Bars change from DB -->

View file

@ -1005,11 +1005,11 @@
text_ref="BR BR"
w="100"
prompt=""
enter_loose_focus="true"
enter_loose_ChaScore4="true"
multi_line="false"
onenter="game_config_change_screen_ratio_custom"
enter_recover_focus="false"
reset_focus_on_hide="true"
enter_recover_ChaScore4="false"
reset_ChaScore4_on_hide="true"
max_historic="0"
entry_type="positive_float"
max_float_prec="5"
@ -1334,7 +1334,7 @@
y="0"
hardtext="uiHud" />
<!--<instance template="tgcw_checkbox" id="suc" text="uiShowUnderCursor" posref="TL TL" x="0" y="-20" />
<instance template="tgcw_checkbox" id="sta" text="uiShowTargeted" posref="BL TL" posparent="suc" x="0" y="-12" />-->
<instance template="tgcw_checkbox" id="ChaScore2" text="uiShowTargeted" posref="BL TL" posparent="suc" x="0" y="-12" />-->
<instance template="tgcw_checkbox"
id="swrc"
text="uiSelectWithRClick"
@ -2042,35 +2042,35 @@
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_user_hp"
text="uiHP"
tooltip="uittHP"
id="is_user_ChaScore1"
text="uiChaScore1"
tooltip="uittChaScore1"
posref="BL TL"
posparent="is_user_guild_name"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_user_sap"
text="uiSAP"
tooltip="uittSAP"
id="is_user_ChaScore3"
text="uiChaScore3"
tooltip="uittChaScore3"
posref="BL TL"
posparent="is_user_hp"
posparent="is_user_ChaScore1"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_user_sta"
text="uiSTA"
tooltip="uittSTA"
id="is_user_ChaScore2"
text="uiChaScore2"
tooltip="uittChaScore2"
posref="BL TL"
posparent="is_user_sap"
posparent="is_user_ChaScore3"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_user_focus"
text="uiFOC"
tooltip="uittFocus"
id="is_user_ChaScore4"
text="uiChaScore4"
tooltip="uittChaScore4"
posref="BL TL"
posparent="is_user_sta"
posparent="is_user_ChaScore2"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
@ -2078,7 +2078,7 @@
text="uiActionBar"
tooltip="uittActionBar"
posref="BL TL"
posparent="is_user_focus"
posparent="is_user_ChaScore4"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
@ -2159,35 +2159,35 @@
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_friend_hp"
text="uiHP"
tooltip="uittHP"
id="is_friend_ChaScore1"
text="uiChaScore1"
tooltip="uittChaScore1"
posref="BL TL"
posparent="is_friend_guild_name"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_friend_sap"
text="uiSAP"
tooltip="uittSTA"
id="is_friend_ChaScore3"
text="uiChaScore3"
tooltip="uittChaScore3"
posref="BL TL"
posparent="is_friend_hp"
posparent="is_friend_ChaScore1"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_friend_sta"
text="uiSTA"
tooltip="uittSAP"
id="is_friend_ChaScore2"
text="uiChaScore2"
tooltip="uittChaScore2"
posref="BL TL"
posparent="is_friend_sap"
posparent="is_friend_ChaScore3"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_friend_focus"
text="uiFOC"
tooltip="uittFocus"
id="is_friend_ChaScore4"
text="uiChaScore4"
tooltip="uittChaScore4"
posref="BL TL"
posparent="is_friend_sta"
posparent="is_friend_ChaScore2"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
@ -2195,7 +2195,7 @@
text="uiPvpLogo"
tooltip="uittPvpLogo"
posref="BL TL"
posparent="is_friend_focus"
posparent="is_friend_ChaScore4"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
@ -2300,9 +2300,9 @@
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_enemy_hp"
text="uiHP"
tooltip="uittHP"
id="is_enemy_ChaScore1"
text="uiChaScore1"
tooltip="uittChaScore1"
posref="BL TL"
posparent="is_enemy_guild_name"
x="0"
@ -2312,7 +2312,7 @@
text="uiPvpLogo"
tooltip="uittPvpLogo"
posref="BL TL"
posparent="is_enemy_hp"
posparent="is_enemy_ChaScore1"
x="0"
y="-4" />
</group>
@ -3222,7 +3222,7 @@
preset="UI:TEMP:PRESET_FX" />
<!--
<param ui="hud:suc:c" type="cfg" widget="boolbut" link="ShowNameUnderCursor" realtime="true"/>
<param ui="hud:sta:c" type="cfg" widget="boolbut" link="ShowNameSelected" realtime="true"/>
<param ui="hud:ChaScore2:c" type="cfg" widget="boolbut" link="ShowNameSelected" realtime="true"/>
-->
<param ui="hud:swrc:c"
type="cfg"
@ -3548,25 +3548,25 @@
widget="boolbut"
link="UI:SAVE:INSCENE:USER:GUILD_NAME"
realtime="true" />
<param ui="in_scene_user:is_user_hp:c"
<param ui="in_scene_user:is_user_ChaScore1:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:USER:HP"
link="UI:SAVE:INSCENE:USER:ChaScore1"
realtime="true" />
<param ui="in_scene_user:is_user_sap:c"
<param ui="in_scene_user:is_user_ChaScore3:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:USER:SAP"
link="UI:SAVE:INSCENE:USER:ChaScore3"
realtime="true" />
<param ui="in_scene_user:is_user_sta:c"
<param ui="in_scene_user:is_user_ChaScore2:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:USER:STA"
link="UI:SAVE:INSCENE:USER:ChaScore2"
realtime="true" />
<param ui="in_scene_user:is_user_focus:c"
<param ui="in_scene_user:is_user_ChaScore4:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:USER:FOCUS"
link="UI:SAVE:INSCENE:USER:ChaScore4"
realtime="true" />
<param ui="in_scene_user:is_user_action:c"
type="db"
@ -3603,25 +3603,25 @@
widget="boolbut"
link="UI:SAVE:INSCENE:FRIEND:GUILD_NAME"
realtime="true" />
<param ui="in_scene_friend:is_friend_hp:c"
<param ui="in_scene_friend:is_friend_ChaScore1:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:FRIEND:HP"
link="UI:SAVE:INSCENE:FRIEND:ChaScore1"
realtime="true" />
<param ui="in_scene_friend:is_friend_sap:c"
<param ui="in_scene_friend:is_friend_ChaScore3:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:FRIEND:SAP"
link="UI:SAVE:INSCENE:FRIEND:ChaScore3"
realtime="true" />
<param ui="in_scene_friend:is_friend_sta:c"
<param ui="in_scene_friend:is_friend_ChaScore2:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:FRIEND:STA"
link="UI:SAVE:INSCENE:FRIEND:ChaScore2"
realtime="true" />
<param ui="in_scene_friend:is_friend_focus:c"
<param ui="in_scene_friend:is_friend_ChaScore4:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:FRIEND:FOCUS"
link="UI:SAVE:INSCENE:FRIEND:ChaScore4"
realtime="true" />
<param ui="in_scene_friend:is_friend_pvp_logo:c"
type="db"
@ -3673,10 +3673,10 @@
widget="boolbut"
link="UI:SAVE:INSCENE:ENEMY:GUILD_NAME"
realtime="true" />
<param ui="in_scene_enemy:is_enemy_hp:c"
<param ui="in_scene_enemy:is_enemy_ChaScore1:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:ENEMY:HP"
link="UI:SAVE:INSCENE:ENEMY:ChaScore1"
realtime="true" />
<param ui="in_scene_enemy:is_ennemy_pvp_logo:c"
type="db"

View file

@ -758,46 +758,46 @@
fontsize="10"
color="255 255 255 255" />
<instance template="tipc_score"
id="lif"
id="ChaScore1"
posref="TL TL"
x="8"
y="-20"
w="-8"
tooltip="uittIdentityHP"
text="uiHP"
val="%player_hp"
maxval="%player_hp_max"
baseval="%player_hp_base" />
tooltip="uittIdentityChaScore1"
text="uiChaScore1"
val="%player_ChaScore1"
maxval="%player_ChaScore1_max"
baseval="%player_ChaScore1_base" />
<instance template="tipc_score"
id="sap"
posparent="lif"
id="ChaScore3"
posparent="ChaScore1"
posref="BL TL"
y="0"
tooltip="uittIdentitySap"
text="uiSap"
val="%player_sap"
maxval="%player_sap_max"
baseval="%player_sap_base" />
tooltip="uittIdentityChaScore3"
text="uiChaScore3"
val="%player_ChaScore3"
maxval="%player_ChaScore3_max"
baseval="%player_ChaScore3_base" />
<instance template="tipc_score"
id="sta"
posparent="sap"
id="ChaScore2"
posparent="ChaScore3"
posref="BL TL"
y="0"
tooltip="uittIdentitySta"
text="uiStamina"
val="%player_sta"
maxval="%player_sta_max"
baseval="%player_sta_base" />
tooltip="uittIdentityChaScore2"
text="uiChaScore2"
val="%player_ChaScore2"
maxval="%player_ChaScore2_max"
baseval="%player_ChaScore2_base" />
<instance template="tipc_score"
id="foc"
posparent="sta"
id="ChaScore4"
posparent="ChaScore2"
posref="BL TL"
y="0"
tooltip="uittIdentityFoc"
text="uiFocus"
val="%player_focus"
maxval="%player_focus_max"
baseval="%player_focus_base" />
tooltip="uittIdentityChaScore4"
text="uiChaScore4"
val="%player_ChaScore4"
maxval="%player_ChaScore4_max"
baseval="%player_ChaScore4_base" />
<view type="text"
id="Regen"
posref="TL TL"
@ -808,42 +808,42 @@
fontsize="10"
color="255 255 255 255" />
<instance template="tipc_characReg"
id="hpreg"
id="ChaScore1reg"
posref="TL TL"
x="8"
y="-105"
w="-8"
text="uiHP"
val="%player_hpreg"
baseval="%player_hpreg_base"
tooltip="uittIdentityHPReg" />
text="uiChaScore1"
val="%player_ChaScore1reg"
baseval="%player_ChaScore1reg_base"
tooltip="uittIdentityChaScore1Reg" />
<instance template="tipc_characReg"
id="sapreg"
posparent="hpreg"
id="ChaScore3reg"
posparent="ChaScore1reg"
posref="BL TL"
y="0"
text="uiSap"
val="%player_sapreg"
baseval="%player_sapreg_base"
tooltip="uittIdentitySapReg" />
text="uiChaScore3"
val="%player_ChaScore3reg"
baseval="%player_ChaScore3reg_base"
tooltip="uittIdentityChaScore3Reg" />
<instance template="tipc_characReg"
id="stareg"
posparent="sapreg"
id="ChaScore2reg"
posparent="ChaScore3reg"
posref="BL TL"
y="0"
text="uiStamina"
val="%player_stareg"
baseval="%player_stareg_base"
tooltip="uittIdentityStaReg" />
text="uiChaScore2"
val="%player_ChaScore2reg"
baseval="%player_ChaScore2reg_base"
tooltip="uittIdentityChaScore2Reg" />
<instance template="tipc_characReg"
id="focreg"
posparent="stareg"
id="ChaScore4reg"
posparent="ChaScore2reg"
posref="BL TL"
y="0"
text="uiFocus"
val="%player_focreg"
baseval="%player_focreg_base"
tooltip="uittIdentityFocReg" />
text="uiChaScore4"
val="%player_ChaScore4reg"
baseval="%player_ChaScore4reg_base"
tooltip="uittIdentityChaScore4Reg" />
</group>
<instance template="inner_thin_border"
posparent="black"
@ -875,71 +875,71 @@
h="172"
inherit_gc_alpha="true">
<instance template="tipc_charac"
id="hpmax"
id="ChaScore1max"
posref="TL TL"
x="8"
y="-20"
w="-8"
text="uiCarac_HpMax"
val="%player_carac_hpmax"
tooltip="uittIdentityCons" />
text="uiCarac_ChaScore1Max"
val="%player_carac_ChaScore1max"
tooltip="uittIdentityCha1" />
<instance template="tipc_charac"
id="sapmax"
posparent="hpmax"
id="ChaScore3max"
posparent="ChaScore1max"
posref="BL TL"
y="0"
text="uiCarac_SapMax"
val="%player_carac_sapmax"
tooltip="uittIdentityInt" />
text="uiCarac_ChaScore3Max"
val="%player_carac_ChaScore3max"
tooltip="uittIdentityCha3" />
<instance template="tipc_charac"
id="stamax"
posparent="sapmax"
id="ChaScore2max"
posparent="ChaScore3max"
posref="BL TL"
y="0"
text="uiCarac_StaMax"
val="%player_carac_stamax"
tooltip="uittIdentityStr" />
text="uiCarac_ChaScore2Max"
val="%player_carac_ChaScore2max"
tooltip="uittIdentityCha2" />
<instance template="tipc_charac"
id="focmax"
posparent="stamax"
id="ChaScore4max"
posparent="ChaScore2max"
posref="BL TL"
y="0"
text="uiCarac_WishMax"
val="%player_carac_wishmax"
tooltip="uittIdentityDex" />
text="uiCarac_ChaScore4Max"
val="%player_carac_ChaScore4max"
tooltip="uittIdentityCha4" />
<instance template="tipc_charac"
id="hpreg"
id="ChaScore1reg"
posref="TL TL"
x="8"
y="-105"
w="-8"
text="uiCarac_HpReg"
val="%player_carac_hpreg"
tooltip="uittIdentityMeta" />
text="uiCarac_ChaScore1Reg"
val="%player_carac_ChaScore1reg"
tooltip="uittIdentityCha1Reg" />
<instance template="tipc_charac"
id="sapreg"
posparent="hpreg"
id="ChaScore3reg"
posparent="ChaScore1reg"
posref="BL TL"
y="0"
text="uiCarac_SapReg"
val="%player_carac_sapreg"
tooltip="uittIdentityWis" />
text="uiCarac_ChaScore3Reg"
val="%player_carac_ChaScore3reg"
tooltip="uittIdentityCha3Reg" />
<instance template="tipc_charac"
id="stareg"
posparent="sapreg"
id="ChaScore2reg"
posparent="ChaScore3reg"
posref="BL TL"
y="0"
text="uiCarac_StaReg"
text="uiCarac_ChaScore2Reg"
val="%player_carac_stareg"
tooltip="uittIdentityWB" />
tooltip="uittIdentityCha2Reg" />
<instance template="tipc_charac"
id="focreg"
posparent="stareg"
id="ChaScore4reg"
posparent="ChaScore2reg"
posref="BL TL"
y="0"
text="uiCarac_WishReg"
val="%player_carac_wishreg"
tooltip="uittIdentityWill" />
text="uiCarac_ChaScore4Reg"
val="%player_carac_ChaScore4reg"
tooltip="uittIdentityCha4Reg" />
</group>
<instance template="inner_thin_border"
posparent="black"

View file

@ -94,19 +94,19 @@
<view type="bar3"
id="jauges"
posref="TR TR"
color1="%focus_color"
value1="%target_focus"
color1="%ChaScore4_color"
value1="%target_ChaScore4"
range1="UI:CONST:127"
color2="%sap_color"
value2="%target_sap"
color2="%ChaScore3_color"
value2="%target_ChaScore3"
range2="UI:CONST:127"
color3="%sta_color"
value3="%target_sta"
color3="%ChaScore2_color"
value3="%target_ChaScore2"
range3="UI:CONST:127" />
<ctrl type="tooltip"
id="tt1"
tooltip="uiStamina"
color="%sta_color"
tooltip="uiChaScore2"
color="%ChaScore2_color"
posparent="jauges"
posref="TL TL"
x="0"
@ -116,8 +116,8 @@
h="0" />
<ctrl type="tooltip"
id="tt2"
tooltip="uiSap"
color="%sap_color"
tooltip="uiChaScore3"
color="%ChaScore3_color"
posparent="tt1"
posref="BL BL"
x="0"
@ -127,8 +127,8 @@
h="0" />
<ctrl type="tooltip"
id="tt3"
tooltip="uiFocus"
color="%focus_color"
tooltip="uiChaScore4"
color="%ChaScore4_color"
posparent="tt2"
posref="BL TL"
x="0"
@ -361,22 +361,22 @@
posref="TL TL">
<!-- new Jauges -->
<view type="bitmap"
id="b_life"
id="b_ChaScore1"
posref="TL TL"
x="0"
y="-2"
texture="slot_jauge.tga"
inherit_gc_alpha="false" />
<instance template="jauge_score_target"
id="jlife"
posparent="b_life"
id="jChaScore1"
posparent="b_ChaScore1"
posref="TL TL"
color="214 56 7 255"
text="uiHP"
val="%target_hp" />
text="uiChaScore1"
val="%target_ChaScore1" />
<instance template="text_tt"
posparent="jlife"
tooltip="uittTargetHp"
posparent="jChaScore1"
tooltip="uittTargetChaScore1"
tooltip_parent="win" />
</group>
@ -1485,15 +1485,15 @@
posref="MR MR"
mini="true"
x="-16"
color1="%sta_color"
value1="UI:VARIABLES:BARS:TEAM:#team_mate_index:STA"
color1="%ChaScore2_color"
value1="UI:VARIABLES:BARS:TEAM:#team_mate_index:ChaScore2"
range1="UI:CONST:127"
color2="%sap_color"
value2="UI:VARIABLES:BARS:TEAM:#team_mate_index:SAP"
color2="%ChaScore3_color"
value2="UI:VARIABLES:BARS:TEAM:#team_mate_index:ChaScore3"
range2="UI:CONST:127"
color3="%hp_color"
color3_negative="%hp_color_neg"
value3="UI:VARIABLES:BARS:TEAM:#team_mate_index:HP"
color3="%ChaScore1_color"
color3_negative="%ChaScore1_color_neg"
value3="UI:VARIABLES:BARS:TEAM:#team_mate_index:ChaScore1"
range3="UI:CONST:127" />
<view type="bitmap"
id="lead"
@ -1578,9 +1578,9 @@
<!--
<group id="header_opened" x="0" y="0" w="160" child_resize_h="true" child_resize_hmargin="4" posref="TL TL" >
<view type="bar3" id="jauges" posref="TR TR" y="-2" mini="true" x="-16"
color1="%sta_color" value1="UI:VARIABLES:BARS:TEAM:#team_mate_index:STA" range1="UI:CONST:127"
color2="%sap_color" value2="UI:VARIABLES:BARS:TEAM:#team_mate_index:SAP" range2="UI:CONST:127"
color3="%hp_color" color3_negative="%hp_color_neg" value3="UI:VARIABLES:BARS:TEAM:#team_mate_index:HP" range3="UI:CONST:127" />
color1="%ChaScore2_color" value1="UI:VARIABLES:BARS:TEAM:#team_mate_index:ChaScore2" range1="UI:CONST:127"
color2="%ChaScore3_color" value2="UI:VARIABLES:BARS:TEAM:#team_mate_index:ChaScore3" range2="UI:CONST:127"
color3="%ChaScore1_color" color3_negative="%ChaScore1_color_neg" value3="UI:VARIABLES:BARS:TEAM:#team_mate_index:ChaScore1" range3="UI:CONST:127" />
<view type="bitmap" id="lead" posparent="jauges" posref="ML MR" x="-4" y="1" texture="w_leader.tga" global_color="false" />
<view type="bitmap" id="successor" posparent="jauges" posref="ML MR" x="-4" y="1" texture="w_leader.tga" global_color="false" color="255 255 255 128" active="false"/>

View file

@ -1051,15 +1051,15 @@ This MUST follow the Enum MISSION_DESC::TIconId
<!-- ***************************** -->
<!-- * COMMON DEFINE COLORS * -->
<!-- ***************************** -->
<define id="hp_color"
<define id="ChaScore1_color"
value="255 64 0 255" />
<define id="hp_color_neg"
<define id="ChaScore1_color_neg"
value="127 32 0 255" />
<define id="sta_color"
<define id="ChaScore2_color"
value="255 0 255 255" />
<define id="sap_color"
<define id="ChaScore3_color"
value="72 255 0 255" />
<define id="focus_color"
<define id="ChaScore4_color"
value="0 128 255 255" />
<define id="bulk_color"
value="215 185 75 255" />

View file

@ -227,15 +227,15 @@
<!-- ***************************** -->
<!-- * COMMON DEFINE COLORS * -->
<!-- ***************************** -->
<define id="hp_color"
<define id="ChaScore1_color"
value="255 64 0 255" />
<define id="hp_color_neg"
<define id="ChaScore1_color_neg"
value="127 32 0 255" />
<define id="sta_color"
<define id="ChaScore2_color"
value="255 0 255 255" />
<define id="sap_color"
<define id="ChaScore3_color"
value="72 255 0 255" />
<define id="focus_color"
<define id="ChaScore4_color"
value="0 128 255 255" />
<define id="bulk_color"
value="215 185 75 255" />

View file

@ -7,14 +7,14 @@
<variable entry="UI:TEMP:POINTS" type="sint64" value="0" />
<variable entry="UI:TEMP:CAREERBACKHOME" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:HPMAX" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:HPREG" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:STAMAX" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:STAREG" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:SAPMAX" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:SAPREG" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:WISHMAX" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:WISHREG" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:ChaScore1MAX" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:ChaScore1REG" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:ChaScore2MAX" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:ChaScore2REG" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:ChaScore3MAX" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:ChaScore3REG" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:ChaScore4MAX" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CARACS:ChaScore4REG" type="sint64" value="-1"/>
<variable entry="UI:TEMP:CHAR3D:CAREER" type="sint64" value="0"/>
@ -26,47 +26,47 @@
<!-- BASE CARACS PART -->
<proc id="proc_set_base_caracs_fy">
<action handler="set" params="dblink=UI:TEMP:CARACS:HPMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:HPREG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:STAMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:STAREG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:SAPMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:SAPREG|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:WISHMAX|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:WISHREG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=30" />
</proc>
<proc id="proc_set_base_caracs_ma">
<action handler="set" params="dblink=UI:TEMP:CARACS:HPMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:HPREG|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:STAMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:STAREG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:SAPMAX|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:SAPREG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:WISHMAX|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:WISHREG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=30" />
</proc>
<proc id="proc_set_base_caracs_tr">
<action handler="set" params="dblink=UI:TEMP:CARACS:HPMAX|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:HPREG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:STAMAX|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:STAREG|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:SAPMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:SAPREG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:WISHMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:WISHREG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=35" />
</proc>
<proc id="proc_set_base_caracs_zo">
<action handler="set" params="dblink=UI:TEMP:CARACS:HPMAX|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:HPREG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:STAMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:STAREG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:SAPMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:SAPREG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:WISHMAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:WISHREG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=20" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=35" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=30" />
<action handler="set" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=30" />
</proc>
<!-- ADD CARACS PART -->
@ -74,136 +74,136 @@
<proc id="proc_set_add_caracs_fy">
<!--Fighter-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
<!--Magician-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
<!--Craftsman-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
</proc>
<proc id="proc_set_add_caracs_ma">
<!--Fighter-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
<!--Magician-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
<!--Craftsman-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
</proc>
<proc id="proc_set_add_caracs_tr">
<!--Fighter-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
<!--Magician-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
<!--Craftsman-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
</proc>
<proc id="proc_set_add_caracs_zo">
<!--Fighter-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,1)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
<!--Magician-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,2)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
<!--Craftsman-->
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:HPMAX|value=add(@@UI:TEMP:CARACS:HPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:HPREG|value=add(@@UI:TEMP:CARACS:HPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:STAMAX|value=add(@@UI:TEMP:CARACS:STAMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:STAREG|value=add(@@UI:TEMP:CARACS:STAREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:SAPMAX|value=add(@@UI:TEMP:CARACS:SAPMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:SAPREG|value=add(@@UI:TEMP:CARACS:SAPREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:WISHMAX|value=add(@@UI:TEMP:CARACS:WISHMAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:WISHREG|value=add(@@UI:TEMP:CARACS:WISHREG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore1MAX|value=add(@@UI:TEMP:CARACS:ChaScore1MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore1REG|value=add(@@UI:TEMP:CARACS:ChaScore1REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore2MAX|value=add(@@UI:TEMP:CARACS:ChaScore2MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore2REG|value=add(@@UI:TEMP:CARACS:ChaScore2REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore3MAX|value=add(@@UI:TEMP:CARACS:ChaScore3MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore3REG|value=add(@@UI:TEMP:CARACS:ChaScore3REG,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore4MAX|value=add(@@UI:TEMP:CARACS:ChaScore4MAX,5)" />
<action handler="set" cond="eq(@UI:TEMP:CAREERCLICKJOB,3)" params="dblink=UI:TEMP:CARACS:ChaScore4REG|value=add(@@UI:TEMP:CARACS:ChaScore4REG,5)" />
</proc>
@ -1156,20 +1156,20 @@
<view type="bitmap" id="bgtable" posref="TL TL" x="0" y="0" texture="blank.tga" color="45 57 38 128" scale="true" sizeref="wh" global_color="false" render_layer="-2" />
<instance template="window_border" id="bordure" posref="MM MM" />
<instance template="caracs_reg" id="c_hpreg" posref="TM TM" x="0" y="-8" color="%hp_color" carac="uiCarac_HpReg" value_carac="UI:TEMP:CARACS:HPREG" score="uiHpReg" value_score="div(@UI:TEMP:CARACS:HPREG,10)" />
<instance template="caracs_reg" id="c_stareg" posref="BL TL" posparent="c_hpreg" x="0" y="-2" color="%sta_color" carac="uiCarac_StaReg" value_carac="UI:TEMP:CARACS:STAREG" score="uiStaReg" value_score="div(@UI:TEMP:CARACS:STAREG,10)" />
<instance template="caracs_reg" id="c_sapreg" posref="BL TL" posparent="c_stareg" x="0" y="-2" color="%sap_color" carac="uiCarac_SapReg" value_carac="UI:TEMP:CARACS:SAPREG" score="uiSapReg" value_score="div(@UI:TEMP:CARACS:SAPREG,10)" />
<instance template="caracs_reg" id="c_wishreg" posref="BL TL" posparent="c_sapreg" x="0" y="-2" color="%focus_color" carac="uiCarac_WishReg" value_carac="UI:TEMP:CARACS:WISHREG" score="uiWishReg" value_score="div(@UI:TEMP:CARACS:WISHREG,10)" />
<instance template="caracs_reg" id="c_ChaScore1reg" posref="TM TM" x="0" y="-8" color="%ChaScore1_color" carac="uiCarac_ChaScore1Reg" value_carac="UI:TEMP:CARACS:ChaScore1REG" score="uiChaScore1Reg" value_score="div(@UI:TEMP:CARACS:ChaScore1REG,10)" />
<instance template="caracs_reg" id="c_ChaScore2reg" posref="BL TL" posparent="c_ChaScore1reg" x="0" y="-2" color="%ChaScore2_color" carac="uiCarac_ChaScore2Reg" value_carac="UI:TEMP:CARACS:ChaScore2REG" score="uiChaScore2Reg" value_score="div(@UI:TEMP:CARACS:ChaScore2REG,10)" />
<instance template="caracs_reg" id="c_ChaScore3reg" posref="BL TL" posparent="c_ChaScore2reg" x="0" y="-2" color="%ChaScore3_color" carac="uiCarac_ChaScore3Reg" value_carac="UI:TEMP:CARACS:ChaScore3REG" score="uiChaScore3Reg" value_score="div(@UI:TEMP:CARACS:ChaScore3REG,10)" />
<instance template="caracs_reg" id="c_ChaScore4reg" posref="BL TL" posparent="c_ChaScore3reg" x="0" y="-2" color="%ChaScore4_color" carac="uiCarac_ChaScore4Reg" value_carac="UI:TEMP:CARACS:ChaScore4REG" score="uiChaScore4Reg" value_score="div(@UI:TEMP:CARACS:ChaScore4REG,10)" />
</group>
<group id="table1" posparent="table2" posref="TR BR" w="306" h="117" x="0" y="24" active="false" >
<view type="bitmap" id="bgtable" posref="TL TL" x="0" y="0" texture="blank.tga" color="45 57 38 128" scale="true" sizeref="wh" global_color="false" render_layer="-2" />
<instance template="window_border" id="bordure" posref="MM MM" />
<instance template="caracs_max" id="c_hpmax" posref="TM TM" x="0" y="-8" color="%hp_color" carac="uiCarac_HpMax" value_carac="UI:TEMP:CARACS:HPMAX" score="uiHpMax" value_score="mul(@UI:TEMP:CARACS:HPMAX,10)" />
<instance template="caracs_max" id="c_stamax" posref="BL TL" posparent="c_hpmax" x="0" y="-2" color="%sta_color" carac="uiCarac_StaMax" value_carac="UI:TEMP:CARACS:STAMAX" score="uiStaMax" value_score="mul(@UI:TEMP:CARACS:STAMAX,10)" />
<instance template="caracs_max" id="c_sapmax" posref="BL TL" posparent="c_stamax" x="0" y="-2" color="%sap_color" carac="uiCarac_SapMax" value_carac="UI:TEMP:CARACS:SAPMAX" score="uiSapMax" value_score="mul(@UI:TEMP:CARACS:SAPMAX,10)" />
<instance template="caracs_max" id="c_wishmax" posref="BL TL" posparent="c_sapmax" x="0" y="-2" color="%focus_color" carac="uiCarac_WishMax" value_carac="UI:TEMP:CARACS:WISHMAX" score="uiWishMax" value_score="mul(@UI:TEMP:CARACS:WISHMAX,10)" />
<instance template="caracs_max" id="c_ChaScore1max" posref="TM TM" x="0" y="-8" color="%ChaScore1_color" carac="uiCarac_ChaScore1Max" value_carac="UI:TEMP:CARACS:ChaScore1MAX" score="uiChaScore1Max" value_score="mul(@UI:TEMP:CARACS:ChaScore1MAX,10)" />
<instance template="caracs_max" id="c_ChaScore2max" posref="BL TL" posparent="c_ChaScore1max" x="0" y="-2" color="%ChaScore2_color" carac="uiCarac_ChaScore2Max" value_carac="UI:TEMP:CARACS:ChaScore2MAX" score="uiChaScore2Max" value_score="mul(@UI:TEMP:CARACS:ChaScore2MAX,10)" />
<instance template="caracs_max" id="c_ChaScore3max" posref="BL TL" posparent="c_ChaScore2max" x="0" y="-2" color="%ChaScore3_color" carac="uiCarac_ChaScore3Max" value_carac="UI:TEMP:CARACS:ChaScore3MAX" score="uiChaScore3Max" value_score="mul(@UI:TEMP:CARACS:ChaScore3MAX,10)" />
<instance template="caracs_max" id="c_ChaScore4max" posref="BL TL" posparent="c_ChaScore3max" x="0" y="-2" color="%ChaScore4_color" carac="uiCarac_ChaScore4Max" value_carac="UI:TEMP:CARACS:ChaScore4MAX" score="uiChaScore4Max" value_score="mul(@UI:TEMP:CARACS:ChaScore4MAX,10)" />
</group>
<view type="text" id="table2_txt" posparent="table2" posref="TL BL" x="0" y="2" hardtext="uiScoreRegen" fontsize="16" color="255 255 255 255" render_layer="-1" />

View file

@ -221,15 +221,15 @@
<!-- ***************************** -->
<!-- * COMMON DEFINE COLORS * -->
<!-- ***************************** -->
<define id="hp_color"
<define id="ChaScore1_color"
value="255 64 0 255" />
<define id="hp_color_neg"
<define id="ChaScore1_color_neg"
value="127 32 0 255" />
<define id="sta_color"
<define id="ChaScore2_color"
value="255 0 255 255" />
<define id="sap_color"
<define id="ChaScore3_color"
value="72 255 0 255" />
<define id="focus_color"
<define id="ChaScore4_color"
value="0 128 255 255" />
<define id="bulk_color"
value="215 185 75 255" />

View file

@ -545,10 +545,10 @@
<view type="text" id="max" posref="TR TR" x="-36" y="-4" hardtext="uiSumMax" shadow="true" fontsize="16" color="255 255 255 255" />
<view type="text" id="reg" posref="TR TR" x="-4" y="-4" hardtext="uiSumReg" shadow="true" fontsize="16" color="255 255 255 255" />
<instance template="sum_caracs" id="c_hpmax" posref="TL TL" x="4" y="-24" title="uiSumHp" color="%hp_color" max="mul(@UI:TEMP:CARACS:HPMAX,10)" reg="div(@UI:TEMP:CARACS:HPREG,10)" />
<instance template="sum_caracs" id="c_stamax" posref="BL TL" posparent="c_hpmax" x="0" y="-2" title="uiSumSta" color="%sta_color" max="mul(@UI:TEMP:CARACS:STAMAX,10)" reg="div(@UI:TEMP:CARACS:STAREG,10)" />
<instance template="sum_caracs" id="c_sapmax" posref="BL TL" posparent="c_stamax" x="0" y="-2" title="uiSumSap" color="%sap_color" max="mul(@UI:TEMP:CARACS:SAPMAX,10)" reg="div(@UI:TEMP:CARACS:SAPREG,10)" />
<instance template="sum_caracs" id="c_wishmax" posref="BL TL" posparent="c_sapmax" x="0" y="-2" title="uiSumWish" color="%focus_color" max="mul(@UI:TEMP:CARACS:WISHMAX,10)" reg="div(@UI:TEMP:CARACS:WISHREG,10)" />
<instance template="sum_caracs" id="c_ChaScore1max" posref="TL TL" x="4" y="-24" title="uiSumChaScore1" color="%ChaScore1_color" max="mul(@UI:TEMP:CARACS:ChaScore1MAX,10)" reg="div(@UI:TEMP:CARACS:ChaScore1REG,10)" />
<instance template="sum_caracs" id="c_ChaScore2max" posref="BL TL" posparent="c_ChaScore1max" x="0" y="-2" title="uiSumChaScore2" color="%ChaScore2_color" max="mul(@UI:TEMP:CARACS:ChaScore2MAX,10)" reg="div(@UI:TEMP:CARACS:ChaScore2REG,10)" />
<instance template="sum_caracs" id="c_ChaScore3max" posref="BL TL" posparent="c_ChaScore2max" x="0" y="-2" title="uiSumChaScore3" color="%ChaScore3_color" max="mul(@UI:TEMP:CARACS:ChaScore3MAX,10)" reg="div(@UI:TEMP:CARACS:ChaScore3REG,10)" />
<instance template="sum_caracs" id="c_ChaScore4max" posref="BL TL" posparent="c_ChaScore3max" x="0" y="-2" title="uiSumChaScore4" color="%ChaScore4_color" max="mul(@UI:TEMP:CARACS:ChaScore4MAX,10)" reg="div(@UI:TEMP:CARACS:ChaScore4REG,10)" />
-->
</group>

View file

@ -732,17 +732,17 @@
global_color="false" />
<link expr="getSPhraseName(@SERVER:EXECUTE_PHRASE:LINK:#index:PHRASE)" target="spell_name:uc_hardtext" />
<!-- COSTS (HP, SAP, STA) -->
<!-- COSTS (ChaScore1, ChaScore3, ChaScore2) -->
<!--
<view type="text" id="costs" posparent="spell" posref="BR BL" x="2" y="0" shadow="true" fontsize="8" hardtext="uiLinksCosts" />
-->
<instance template="box_widget" id="box_cost" posref="BL BL" w="81" h="13" />
<view type="text_number" id="hp_cost" posparent="box_cost" posref="ML MM" x="14" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:HP_COST" color="%hp_color" global_color="false" />
<view type="text_number" id="ChaScore1_cost" posparent="box_cost" posref="ML MM" x="14" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:ChaScore1_COST" color="%ChaScore1_color" global_color="false" />
<view type="text" id="sep1" posparent="box_cost" posref="ML MM" x="27" y="-1" shadow="true" fontsize="10" hardtext="/" color="255 255 255 255" />
<view type="text_number" id="sap_cost" posparent="box_cost" posref="MM MM" x="0" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:SAP_COST" color="%sap_color" global_color="false" />
<view type="text_number" id="ChaScore3_cost" posparent="box_cost" posref="MM MM" x="0" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:ChaScore3_COST" color="%ChaScore3_color" global_color="false" />
<view type="text" id="sep2" posparent="box_cost" posref="ML MM" x="54" y="-1" shadow="true" fontsize="10" hardtext="/" color="255 255 255 255" />
<view type="text_number" id="sta_cost" posparent="box_cost" posref="MR MM" x="-14" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:STA_COST" color="%sta_color" global_color="false" />
<view type="text_number" id="ChaScore2_cost" posparent="box_cost" posref="MR MM" x="-14" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:ChaScore2_COST" color="%ChaScore2_color" global_color="false" />
</group>
<link expr="eq(@UI:VARIABLES:LINKS_INFOS, 0)" target="name_cost:active" />
@ -756,9 +756,9 @@
<view type="text_id" id="name" posref="TL TL" x="0" y="-1" h="10" shadow="true" fontsize="10" textid="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_NAME" />
<!-- Jauges Target -->
<view type="bar3" id="jauges" posref="BL BL" mini="true" y="1"
color1="%sta_color" value1="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_STA" range1="UI:CONST:127"
color2="%sap_color" value2="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_SAP" range2="UI:CONST:127"
color3="%hp_color" value3="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_HP" range3="UI:CONST:127" />
color1="%ChaScore2_color" value1="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_ChaScore2" range1="UI:CONST:127"
color2="%ChaScore3_color" value2="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_ChaScore3" range2="UI:CONST:127"
color3="%ChaScore1_color" value3="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_ChaScore1" range3="UI:CONST:127" />
</group>
<link expr="ifthenelse(eq(@UI:VARIABLES:LINKS_INFOS, 0), 154, 40)" target="target:x" />

View file

@ -44,60 +44,60 @@ end
------------------------------------------------------------------------------------------------------------
-- Update player bars in function of what we wants to display (we can hide each one of the 3 bars : sap,stamina and focus)
-- Update player bars in function of what we wants to display (we can hide each one of the 3 bars : ChaScore3,ChaScore2 and ChaScore4)
function game:updatePlayerBars()
local dispSap = getDbProp('UI:SAVE:PLAYER:DISP_SAP');
local dispSta = getDbProp('UI:SAVE:PLAYER:DISP_STA');
local dispFoc = getDbProp('UI:SAVE:PLAYER:DISP_FOC');
local dispChaScore3 = getDbProp('UI:SAVE:PLAYER:DISP_ChaScore3');
local dispChaScore2 = getDbProp('UI:SAVE:PLAYER:DISP_ChaScore2');
local dispChaScore4 = getDbProp('UI:SAVE:PLAYER:DISP_ChaScore4');
local ui = getUI('ui:interface:player:content');
-- active ui in function of what is displayed
ui.b_sap.active = (dispSap == 1);
ui.jsap.active = (dispSap == 1);
ui.b_ChaScore3.active = (dispChaScore3 == 1);
ui.jChaScore3.active = (dispChaScore3 == 1);
ui.b_sta.active = (dispSta == 1);
ui.jsta.active = (dispSta == 1);
ui.b_ChaScore2.active = (dispChaScore2 == 1);
ui.jChaScore2.active = (dispChaScore2 == 1);
ui.b_foc.active = (dispFoc == 1);
ui.jfoc.active = (dispFoc == 1);
ui.b_ChaScore4.active = (dispChaScore4 == 1);
ui.jChaScore4.active = (dispChaScore4 == 1);
-- choose good y-position
local totalBarDisp = dispSap + dispSta + dispFoc;
local totalBarDisp = dispChaScore3 + dispChaScore2 + dispChaScore4;
if (totalBarDisp == 3) then
ui.b_sap.y = -20;
ui.b_sta.y = -35;
ui.b_foc.y = -50;
ui.b_ChaScore3.y = -20;
ui.b_ChaScore2.y = -35;
ui.b_ChaScore4.y = -50;
ui.current_action.y = -65;
elseif (totalBarDisp == 2) then
if (dispSap == 0) then
ui.b_sta.y = -20;
ui.b_foc.y = -35;
if (dispChaScore3 == 0) then
ui.b_ChaScore2.y = -20;
ui.b_ChaScore4.y = -35;
end
if (dispSta == 0) then
ui.b_sap.y = -20;
ui.b_foc.y = -35;
if (dispCha == 0) then
ui.b_ChaScore3.y = -20;
ui.b_ChaScore4.y = -35;
end
if (dispFoc == 0) then
ui.b_sap.y = -20;
ui.b_sta.y = -35;
if (dispChaScore4 == 0) then
ui.b_ChaScore3.y = -20;
ui.b_ChaScore2.y = -35;
end
ui.current_action.y = -50;
elseif (totalBarDisp == 1) then
ui.b_sta.y = -20;
ui.b_foc.y = -20;
ui.b_sta.y = -20;
ui.b_ChaScore2.y = -20;
ui.b_ChaScore4.y = -20;
ui.b_ChaScore2.y = -20;
ui.current_action.y = -35;
@ -864,10 +864,10 @@ function game:updatePhraseTooltip(phrase)
text = concatUCString(text, "@{CCCF}")
end
-- IMPORTANT : the following getters on 'phrase' take in account the 'total action malus' for the timebeing
self:setPhraseTooltipCarac(ttWin, "hp_cost", phrase:getHpCost())
self:setPhraseTooltipCarac(ttWin, "sta_cost", phrase:getStaCost())
self:setPhraseTooltipCarac(ttWin, "sap_cost", phrase:getSapCost())
self:setPhraseTooltipCarac(ttWin, "focus_cost", phrase:getFocusCost())
self:setPhraseTooltipCarac(ttWin, "ChaScore1_cost", phrase:getChaScore1Cost())
self:setPhraseTooltipCarac(ttWin, "ChaScore2_cost", phrase:getChaScore2Cost())
self:setPhraseTooltipCarac(ttWin, "ChaScore3_cost", phrase:getChaScore3Cost())
self:setPhraseTooltipCarac(ttWin, "ChaScore4_cost", phrase:getChaScore4Cost())
self:setPhraseTooltipCarac(ttWin, "cast_time", phrase:getCastTime(), concatUCString(string.format("%.1f", phrase:getCastTime()), i18n.get("uittSeconds")))
local castRange = phrase:getCastRange()
if not phrase:isMagicPhrase() then
@ -935,10 +935,10 @@ function game:updateBuffItemTooltip(buffItem)
local ttWin = getUI("ui:interface:buff_item_context_help")
local text = buffItem:getName()
self:setPhraseTooltipCarac(ttWin, "hp_buff", buffItem:getHpBuff())
self:setPhraseTooltipCarac(ttWin, "sta_buff", buffItem:getStaBuff())
self:setPhraseTooltipCarac(ttWin, "sap_buff", buffItem:getSapBuff())
self:setPhraseTooltipCarac(ttWin, "focus_buff", buffItem:getFocusBuff())
self:setPhraseTooltipCarac(ttWin, "ChaScore1_buff", buffItem:getChaScore1Buff())
self:setPhraseTooltipCarac(ttWin, "ChaScore2_buff", buffItem:getChaScore2Buff())
self:setPhraseTooltipCarac(ttWin, "ChaScore3_buff", buffItem:getChaScore3Buff())
self:setPhraseTooltipCarac(ttWin, "ChaScore4_buff", buffItem:getChaScore4Buff())
updateTooltipCoords()
return text

View file

@ -40,19 +40,19 @@
posref="#posref"
x="#x"
y="#y"
color1="%focus_color"
value1="%player_focus_percent"
color1="%ChaScore4_color"
value1="%player_ChaScore4_percent"
range1="%player_percent_max"
color2="%sap_color"
value2="%player_sap_percent"
color2="%ChaScore3_color"
value2="%player_ChaScore3_percent"
range2="%player_percent_max"
color3="%sta_color"
value3="%player_sta_percent"
color3="%ChaScore2_color"
value3="%player_ChaScore2_percent"
range3="%player_percent_max" />
<ctrl type="tooltip"
id="tt1"
on_tooltip="player_tt_stamina"
color="%sta_color"
on_tooltip="player_tt_cha_score2"
color="%ChaScore2_color"
posparent="jauges"
posref="TL TL"
x="0"
@ -62,8 +62,8 @@
h="0" />
<ctrl type="tooltip"
id="tt2"
on_tooltip="player_tt_sap"
color="%sap_color"
on_tooltip="player_tt_cha_score3"
color="%ChaScore3_color"
posparent="tt1"
posref="BL TL"
x="0"
@ -73,8 +73,8 @@
h="0" />
<ctrl type="tooltip"
id="tt3"
on_tooltip="player_tt_focus"
color="%focus_color"
on_tooltip="player_tt_cha_score4"
color="%ChaScore4_color"
posparent="tt2"
posref="BL TL"
x="0"
@ -196,20 +196,20 @@
<group type="menu"
id="player_jauge_menu"
extends="base_menu_with_color">
<action id="sap_bardisplay"
name="uiSapBarDisplay"
<action id="ChaScore3_bardisplay"
name="uiChaScore3BarDisplay"
handler="set"
params="dblink=UI:SAVE:PLAYER:DISP_SAP|value=not(@UI:SAVE:PLAYER:DISP_SAP)" />
<action id="sta_bardisplay"
name="uiStaBarDisplay"
params="dblink=UI:SAVE:PLAYER:DISP_ChaScore3|value=not(@UI:SAVE:PLAYER:DISP_ChaScore3)" />
<action id="ChaScore2_bardisplay"
name="uiChaScore2BarDisplay"
handler="set"
params="dblink=UI:SAVE:PLAYER:DISP_STA|value=not(@UI:SAVE:PLAYER:DISP_STA)" />
<action id="foc_bardisplay"
name="uiFocBarDisplay"
params="dblink=UI:SAVE:PLAYER:DISP_ChaScore2|value=not(@UI:SAVE:PLAYER:DISP_ChaScore2)" />
<action id="ChaScore4_bardisplay"
name="uiChaScore4BarDisplay"
handler="set"
params="dblink=UI:SAVE:PLAYER:DISP_FOC|value=not(@UI:SAVE:PLAYER:DISP_FOC)" />
params="dblink=UI:SAVE:PLAYER:DISP_ChaScore4|value=not(@UI:SAVE:PLAYER:DISP_ChaScore4)" />
</group>
<link expr="depends(@UI:SAVE:PLAYER:DISP_SAP, @UI:SAVE:PLAYER:DISP_STA, @UI:SAVE:PLAYER:DISP_FOC)"
<link expr="depends(@UI:SAVE:PLAYER:DISP_ChaScore3, @UI:SAVE:PLAYER:DISP_ChaScore2, @UI:SAVE:PLAYER:DISP_ChaScore4)"
action="lua"
params="game:updatePlayerBars()" />
<link expr="depends(@SERVER:CHARACTER_INFO:PVP_FACTION_TAG)"
@ -549,72 +549,72 @@
group_onclick_l="self_target">
<!-- new Jauges -->
<view type="bitmap"
id="b_lif"
id="b_ChaScore1"
posref="TL TL"
texture="slot_jauge.tga"
inherit_gc_alpha="false" />
<view type="bitmap"
id="b_sap"
id="b_ChaScore3"
posref="TL TL"
y="-20"
texture="slot_jauge.tga"
inherit_gc_alpha="false" />
<view type="bitmap"
id="b_sta"
id="b_ChaScore2"
posref="TL TL"
y="-35"
texture="slot_jauge.tga"
inherit_gc_alpha="false" />
<view type="bitmap"
id="b_foc"
id="b_ChaScore4"
posref="TL TL"
y="-50"
texture="slot_jauge.tga"
inherit_gc_alpha="false" />
<instance template="jauge_score"
id="jlife"
posparent="b_lif"
id="jChaScore1"
posparent="b_ChaScore1"
posref="TL TL"
color="214 56 7 255"
color_gray="160 42 5 255"
text="uiHP"
val="%player_hp"
maxval="%player_hp_max"
val_bar="%player_hp_percent"
tooltip="uittGaugesHP" />
text="uiChaScore1"
val="%player_ChaScore1"
maxval="%player_ChaScore1_max"
val_bar="%player_ChaScore1_percent"
tooltip="uittGaugesChaScore1" />
<instance template="jauge_score"
id="jsap"
posparent="b_sap"
id="jChaScore3"
posparent="b_ChaScore3"
posref="TL TL"
color="133 189 5 255"
color_gray="100 141 3 255"
text="uiSap"
val="%player_sap"
maxval="%player_sap_max"
val_bar="%player_sap_percent"
tooltip="uittGaugesSap" />
text="uiChaScore3"
val="%player_ChaScore3"
maxval="%player_ChaScore3_max"
val_bar="%player_ChaScore3_percent"
tooltip="uittGaugesChaScore3" />
<instance template="jauge_score"
id="jsta"
posparent="b_sta"
id="jChaScore2"
posparent="b_ChaScore2"
posref="TL TL"
color="202 67 152 255"
color_gray="151 50 114 255"
text="uiStamina"
val="%player_sta"
maxval="%player_sta_max"
val_bar="%player_sta_percent"
tooltip="uittGaugesSta" />
text="uiChaScore2"
val="%player_ChaScore2"
maxval="%player_ChaScore2_max"
val_bar="%player_ChaScore2_percent"
tooltip="uittGaugesChaScore2" />
<instance template="jauge_score"
id="jfoc"
posparent="b_foc"
id="jChaScore4"
posparent="b_ChaScore4"
posref="TL TL"
color="31 155 197 255"
color_gray="23 116 147 255"
text="uiFocus"
val="%player_focus"
maxval="%player_focus_max"
val_bar="%player_focus_percent"
tooltip="uittGaugesFoc" />
text="uiChaScore4"
val="%player_ChaScore4"
maxval="%player_ChaScore4_max"
val_bar="%player_ChaScore4_percent"
tooltip="uittGaugesChaScore4" />
<!-- Action Progression (display only if user wants to). Important to set active by default, to have correct reset.xml behaviour -->
<instance template="t_current_action_bar"
id="current_action"
@ -1125,8 +1125,8 @@
color2="255 255 255 255"
value2="#beast_db_entry:HUNGER"
range2="31"
color3="%hp_color"
value3="#bars_entry:HP"
color3="%ChaScore1_color"
value3="#bars_entry:ChaScore1"
range3="127" />
<ctrl type="tooltip"
id="tt"

View file

@ -92,10 +92,6 @@
<action handler="set" params="target='ui:interface:gestion_windows:y'|value=add(getprop('ui:interface:gestion_windows:h'),div(sub(getprop('ui:interface:h'),getprop('ui:interface:gestion_windows:h')),2))" />
<action handler="set" params="target='ui:interface:gestion_windows:active'|value=@UI:TEMP:ACTIVE" />
<!-- AppZone -->
<action handler="set" params="target='ui:interface:appzone:active'|value=1" />
<action handler="set" params="target='ui:interface:appzone:x'|value=div(sub(getprop('ui:interface:w'),getprop('ui:interface:appzone:w')),2)" />
<action handler="set" params="target='ui:interface:appzone:y'|value=add(getprop('ui:interface:appzone:h'),2)" />
</proc>
<proc id="proc_reset_interface">
@ -162,10 +158,10 @@
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:NAME|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:TITLE|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:GUILD_NAME|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:HP|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:STA|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:SAP|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:FOCUS|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:ChaScore1|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:ChaScore2|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:ChaScore3|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:ChaScore4|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:ACTION|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:MESSAGES|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:USER:PVP_LOGO|value=1" />
@ -173,10 +169,10 @@
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:NAME|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:TITLE|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:GUILD_NAME|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:HP|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:STA|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:SAP|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:FOCUS|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:ChaScore1|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:ChaScore2|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:ChaScore3|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:ChaScore4|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:MESSAGES|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:PVP_LOGO|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:NPCNAME|value=1" />
@ -187,7 +183,7 @@
<action handler="set" params="dblink=UI:SAVE:INSCENE:ENEMY:NAME|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:ENEMY:TITLE|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:ENEMY:GUILD_NAME|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:ENEMY:HP|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:ENEMY:ChaScore1|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:ENEMY:MESSAGES|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:ENEMY:PVP_LOGO|value=1" />
@ -237,9 +233,9 @@
<action handler="set" params="dblink=UI:SAVE:NIGHT_COLOR|value=makeRGB(127,190,254)" />
<action handler="set" params="dblink=UI:SAVE:SHOW_3D_ITEM_PREVIEW|value=1" />
<action handler="set" params="dblink=UI:SAVE:PLAYER:DISP_SAP|value=1" />
<action handler="set" params="dblink=UI:SAVE:PLAYER:DISP_STA|value=1" />
<action handler="set" params="dblink=UI:SAVE:PLAYER:DISP_FOC|value=1" />
<action handler="set" params="dblink=UI:SAVE:PLAYER:DISP_ChaScore3|value=1" />
<action handler="set" params="dblink=UI:SAVE:PLAYER:DISP_ChaScore2|value=1" />
<action handler="set" params="dblink=UI:SAVE:PLAYER:DISP_ChaScore4|value=1" />
<action handler="set" params="dblink=UI:SAVE:ACT_BAR_OUT|value=1" />
<action handler="set" params="dblink=UI:SAVE:CHAT:FONT_SIZE|value=10" />

View file

@ -3897,39 +3897,39 @@
active="false"
global_color="false"/>
<view type="bitmap"
id="hp_cost"
id="ChaScore1_cost"
texture="ico_heal.tga"
global_color="false"
posref="BL TL"
posparent="success_rate" />
<view type="bitmap"
id="sta_cost"
id="ChaScore2_cost"
y="0"
texture="ico_stamina.tga"
texture="ico_ChaScore2.tga"
global_color="false"
posref="BL TL"
posparent="hp_cost" />
posparent="ChaScore1_cost" />
<view type="bitmap"
id="sap_cost"
id="ChaScore3_cost"
y="0"
texture="ico_sap.tga"
texture="ico_ChaScore3.tga"
global_color="false"
posref="BL TL"
posparent="sta_cost" />
posparent="ChaScore2_cost" />
<view type="bitmap"
id="focus_cost"
id="ChaScore4_cost"
y="0"
texture="ico_focus.tga"
texture="ico_ChaScore4.tga"
global_color="false"
posref="BL TL"
posparent="sap_cost" />
posparent="ChaScore3_cost" />
<view type="bitmap"
id="cast_time"
y="0"
texture="ico_time.tga"
global_color="false"
posref="BL TL"
posparent="focus_cost" />
posparent="ChaScore4_cost" />
<view type="bitmap"
id="cast_range"
y="0"
@ -3938,26 +3938,26 @@
posref="BL TL"
posparent="cast_time" />
<view type="text"
id="hp_cost_text"
posparent="hp_cost"
id="ChaScore1_cost_text"
posparent="ChaScore1_cost"
posref="MR ML"
hardtext="0"
global_color="false"/>
<view type="text"
id="sta_cost_text"
posparent="sta_cost"
id="ChaScore2_cost_text"
posparent="ChaScore2_cost"
posref="MR ML"
hardtext="0"
global_color="false"/>
<view type="text"
id="sap_cost_text"
posparent="sap_cost"
id="ChaScore3_cost_text"
posparent="ChaScore3_cost"
posref="MR ML"
hardtext="0"
global_color="false"/>
<view type="text"
id="focus_cost_text"
posparent="focus_cost"
id="ChaScore4_cost_text"
posparent="ChaScore4_cost"
posref="MR ML"
hardtext="0"
global_color="false"/>
@ -4104,7 +4104,7 @@
line_maxw="300"
multi_line_maxw_only="true" />
<view type="bitmap"
id="hp_buff"
id="ChaScore1_buff"
h="15"
y="0"
texture="ico_heal.tga"
@ -4113,47 +4113,47 @@
posparent="text"
active="true"/>
<view type="bitmap"
id="sta_buff"
id="ChaScore2_buff"
y="0"
texture="ico_stamina.tga"
texture="ico_ChaScore2.tga"
global_color="false"
posref="BL TL"
posparent="hp_buff" />
posparent="ChaScore1_buff" />
<view type="bitmap"
id="sap_buff"
id="ChaScore3_buff"
y="0"
texture="ico_sap.tga"
texture="ico_ChaScore3.tga"
global_color="false"
posref="BL TL"
posparent="sta_buff" />
posparent="ChaScore2_buff" />
<view type="bitmap"
id="focus_buff"
id="ChaScore4_buff"
y="0"
texture="ico_focus.tga"
texture="ico_ChaScore4.tga"
global_color="false"
posref="BL TL"
posparent="sap_buff" />
posparent="ChaScore3_buff" />
<view type="text"
id="hp_buff_text"
posparent="hp_buff"
id="ChaScore1_buff_text"
posparent="ChaScore1_buff"
posref="MR ML"
hardtext="0"
global_color="false"/>
<view type="text"
id="sta_buff_text"
posparent="sta_buff"
id="ChaScore2_buff_text"
posparent="ChaScore2_buff"
posref="MR ML"
hardtext="0"
global_color="false"/>
<view type="text"
id="sap_buff_text"
posparent="sap_buff"
id="ChaScore3_buff_text"
posparent="ChaScore3_buff"
posref="MR ML"
hardtext="0"
global_color="false"/>
<view type="text"
id="focus_buff_text"
posparent="focus_buff"
id="ChaScore4_buff_text"
posparent="ChaScore4_buff"
posref="MR ML"
hardtext="0"
global_color="false"/>
@ -6927,203 +6927,7 @@
</group>
</group>
</template>
<!-- html browsing context -->
<template name="webig_html"
keep="true"
home=""
browse_redo=""
browse_undo=""
browse_refresh="">
<group id="html"
type="webig_html"
posref="TL TL"
home="#home"
title_prefix=""
sizeref="wh"
x="0"
y="0"
w="0"
h="0"
background_color="0 0 0 255"
error_color="255 240 48 255"
link_color="240 155 100 255"
text_color="210 210 210 255"
h1_color="255 255 255 255"
h2_color="255 255 255 255"
h3_color="255 255 255 255"
h4_color="255 255 255 255"
h5_color="255 255 255 255"
h6_color="255 255 255 255"
text_font_size="10"
h1_font_size="20"
h2_font_size="18"
h3_font_size="16"
h4_font_size="14"
h5_font_size="12"
h6_font_size="12"
paragraph_begin_space="12"
multi_line_space_factor="0.25"
td_begin_space="0"
li_begin_space="4"
ul_begin_space="12"
li_indent="-10"
ul_indent="30"
checkbox_bitmap_normal="w_slot_on.tga"
checkbox_bitmap_pushed="w_opacity_on.tga"
checkbox_bitmap_over=""
background_bitmap_view="background_bitmap"
browse_next_time="false"
form_text_area_group="edit_box_widget_multiline"
browse_refresh="#browse_refresh"
browse_undo="#browse_undo"
browse_redo="#browse_redo"
timeout="10">
<group id="black"
posref="BR BR"
sizeref="hw"
w="-10"
h="-12"
inherit_gc_alpha="true" />
<instance template="inner_thin_border"
posparent="black"
inherit_gc_alpha="true " />
<view id="background_bitmap"
type="bitmap"
posparent="black"
posref="MM MM"
sizeref="wh"
w="-2"
h="-2"
inherit_gc_alpha="true"
scale="true"
texture="blank.tga"
global_color="false" />
<group id="text_list"
type="list"
fontsize="9"
posref="TL TL"
posparent="black"
x="2"
y="-2"
space="0"
sizeref="hw"
w="-4"
h="-4"
maxelements="2000" />
<ctrl id="scroll_bar"
style="skin_scroll" />
</group>
</template>
<!-- html browser window -->
<template name="webig_browser"
keep="true"
home=""
w="480"
h="400"
browse_redo=""
browse_undo=""
browse_refresh="">
<group id="browser"
type="container"
w="#w"
h="#h"
x="0"
y="0"
pop_max_w="2000"
pop_max_h="2000"
pop_min_w="64"
pop_min_h="32"
header_color="UI:SAVE:WIN:COLORS:COM"
posref="TL TL"
title=""
global_color="true"
global_color_over="true"
right_button="true"
movable="true"
lockable="true"
active="true"
openable="true"
opened="true"
resizer="true"
on_active="lua"
on_active_params="WebBrowser:onActive()">
<group id="header_closed"
w="64"
h="16"
posref="TL TL"
on_active="lua"
on_active_params="WebBrowser:onClickHeaderClose()" />
<group id="header_opened"
h="16"
w="480"
posref="TL TL"
on_active="lua"
on_active_params="WebBrowser:onClickHeaderOpen()">
<ctrl style="text_button_header"
id="browse_redo"
button_type="push_button"
posref="MR MR"
x="-16"
y="0"
hardtext="uiBrowseRedoButton"
tooltip="uittBrowseRedo"
onclick_l="lua"
params_l="WebBrowser:onClickRedo()"
frozen="true" />
<ctrl style="text_button_header"
id="browse_undo"
button_type="push_button"
posparent="browse_redo"
posref="ML MR"
x="-4"
y="0"
hardtext="uiBrowseUndoButton"
tooltip="uittBrowseUndo"
onclick_l="lua"
params_l="WebBrowser:onClickUndo()"
frozen="true" />
<ctrl style="text_button_header"
id="browse_refresh"
button_type="push_button"
posparent="browse_undo"
posref="ML MR"
x="-4"
y="0"
hardtext="uiBrowseRefresh"
tooltip="uittBrowseRefresh"
onclick_l="lua"
params_l="WebBrowser:onClickRefresh()"
frozen="true" />
<ctrl style="text_button_header"
id="browse_home"
button_type="push_button"
posparent="browse_refresh"
posref="ML MR"
x="-4"
y="0"
hardtext="uiBrowseHome"
tooltip="uittBrowseHome"
onclick_l="lua"
params_l="WebBrowser:onClickHome()" />
</group>
<group id="content"
x="0"
y="0"
w="0"
h="0"
posref="TL TL">
<instance template="webig_html"
home="#home"
browse_redo="#browse_redo"
browse_undo="#browse_undo"
browse_refresh="#browse_refresh" />
</group>
</group>
</template>
<!-- html <hr> element -->
<!-- html <hr> element -->
<template name="html_hr"
keep="true">
@ -7146,24 +6950,4 @@
global_color="false" />
</group>
</template>
<template name="html_form_select_box_menu_widget"
keep="true"
id="sb">
<group type="menu"
id="#id"
posref="BL TL"
x="0"
y="0"
mouse_pos="false"
space="2"
shadow="false"
color="255 255 255 128"
color_over="255 255 255 255"
color_grayed="0 0 0 255"
fontsize="12"
highlight_over="255 255 255 128"
force_inside_screen="false"></group>
</template>
</interface_config>

View file

@ -1,12 +1,12 @@
db SERVER:PACK_ANIMAL:NbBeast 3
db SERVER:PACK_ANIMAL:BEAST:0:HP 32
db SERVER:PACK_ANIMAL:BEAST:0:SAP 32
db SERVER:PACK_ANIMAL:BEAST:0:STA 32
db SERVER:PACK_ANIMAL:BEAST:1:HP 64
db SERVER:PACK_ANIMAL:BEAST:1:SAP 64
db SERVER:PACK_ANIMAL:BEAST:1:STA 64
db SERVER:PACK_ANIMAL:BEAST:2:HP 128
db SERVER:PACK_ANIMAL:BEAST:2:SAP 128
db SERVER:PACK_ANIMAL:BEAST:2:STA 128
db SERVER:PACK_ANIMAL:BEAST:0:ChaScore1 32
db SERVER:PACK_ANIMAL:BEAST:0:ChaScore3 32
db SERVER:PACK_ANIMAL:BEAST:0:ChaScore2 32
db SERVER:PACK_ANIMAL:BEAST:1:ChaScore1 64
db SERVER:PACK_ANIMAL:BEAST:1:ChaScore3 64
db SERVER:PACK_ANIMAL:BEAST:1:ChaScore2 64
db SERVER:PACK_ANIMAL:BEAST:2:ChaScore1 128
db SERVER:PACK_ANIMAL:BEAST:2:ChaScore3 128
db SERVER:PACK_ANIMAL:BEAST:2:ChaScore2 128

View file

@ -1,4 +1,4 @@
db SERVER:PACK_ANIMAL:STEED:Present 1
db SERVER:PACK_ANIMAL:STEED:HP 32
db SERVER:PACK_ANIMAL:STEED:SAP 32
db SERVER:PACK_ANIMAL:STEED:STA 32
db SERVER:PACK_ANIMAL:STEED:ChaScore1 32
db SERVER:PACK_ANIMAL:STEED:ChaScore3 32
db SERVER:PACK_ANIMAL:STEED:ChaScore2 32

View file

@ -1,18 +1,18 @@
db SERVER:GROUP:0:PRESENT 1
db SERVER:GROUP:0:NAME 0
db SERVER:GROUP:0:STA 32
db SERVER:GROUP:0:SAP 32
db SERVER:GROUP:0:HP -32
db SERVER:GROUP:0:ChaScore2 32
db SERVER:GROUP:0:ChaScore3 32
db SERVER:GROUP:0:ChaScore1 -32
db SERVER:GROUP:1:PRESENT 1
db SERVER:GROUP:1:NAME 1
db SERVER:GROUP:1:STA 64
db SERVER:GROUP:1:SAP 64
db SERVER:GROUP:1:HP 64
db SERVER:GROUP:1:ChaScore2 64
db SERVER:GROUP:1:ChaScore3 64
db SERVER:GROUP:1:ChaScore1 64
db SERVER:GROUP:2:PRESENT 1
db SERVER:GROUP:2:NAME 2
db SERVER:GROUP:2:STA 127
db SERVER:GROUP:2:SAP 127
db SERVER:GROUP:2:HP 127
db SERVER:GROUP:2:ChaScore2 127
db SERVER:GROUP:2:ChaScore3 127
db SERVER:GROUP:2:ChaScore1 127
db SERVER:GROUP:LEADER_INDEX 0
db SERVER:GROUP:SUCCESSOR_INDEX 1

View file

@ -1756,12 +1756,12 @@ void CCharacterCL::updateVisualPropertyBars(const NLMISC::TGameCycle &gameCycle,
{
CBarManager::CBarInfo barInfo;
// Encode HP to 7 bits
barInfo.Score[SCORES::hit_points] = (sint8)((prop&0x7ff) * 127 / 1023);
// Encode ChaScore1 to 7 bits
barInfo.Score[SCORES::cha_score1] = (sint8)((prop&0x7ff) * 127 / 1023);
// NB: barInfo are sint8, but no problem, since anything following is 7 bits.
barInfo.Score[SCORES::stamina] = (uint8)((prop>>11)&0x7f);
barInfo.Score[SCORES::sap] = (uint8)((prop>>18)&0x7f);
barInfo.Score[SCORES::focus] = (uint8)((prop>>25)&0x7f);
barInfo.Score[SCORES::cha_score2] = (uint8)((prop>>11)&0x7f);
barInfo.Score[SCORES::cha_score3] = (uint8)((prop>>18)&0x7f);
barInfo.Score[SCORES::cha_score4] = (uint8)((prop>>25)&0x7f);
// update The Bar manager
CBarManager *pBM= CBarManager::getInstance();
@ -1769,13 +1769,13 @@ void CCharacterCL::updateVisualPropertyBars(const NLMISC::TGameCycle &gameCycle,
WHY gameCycle+1 ????? (yoyo)
It's because sometimes I have a bug With target DB update and VP update. This is the scenario
where I suppose the problem rises:
tick=320: EGS::tickUpdate(): player.DBTargetHP.setProp(49)
tick=321: EGS::combat update, target ennemy receives a Hit, VPHp=10 => transmitted to client with timestamp=321
tick=320: EGS::tickUpdate(): player.DBTargetChaScore1.setProp(49)
tick=321: EGS::combat update, target ennemy receives a Hit, VPChaScore1=10 => transmitted to client with timestamp=321
EGS::databaseUpdate(), DB updated, with timestamp=321!!!
Thus I receives on client:
first the VP with Hp=10, timestamp=321
second the DB with Hp=49, timestamp=321 too => replaced => BUG
first the VP with ChaScore1=10, timestamp=321
second the DB with ChaScore1=49, timestamp=321 too => replaced => BUG
NB: DB is typically sent at low frequency by FrontEnd, thus received later on client.
Since databaseUpdate() is called every 2 ticks, adding +1 to VP timestamps solve easily the problem.
@ -1785,19 +1785,19 @@ void CCharacterCL::updateVisualPropertyBars(const NLMISC::TGameCycle &gameCycle,
NB: moreover, tickupdate() is called every 8 (or 16) ticks, and databaseUpdate() every 2 ticks. So there is one more
possible bug:
318: EGS::tickUpdate(): player.DBTargetHP.setProp(49)
319: EGS::combat update, target ennemy receives a Hit, VPHp=10 => transmitted to client with timestamp=319
318: EGS::tickUpdate(): player.DBTargetChaScore1.setProp(49)
319: EGS::combat update, target ennemy receives a Hit, VPChaScore1=10 => transmitted to client with timestamp=319
EGS::databaseUpdate(), BUT decide to send only a small subset of DB (because lot of things to send)
=> our TargetHP is not updated
=> our TargetChaScore1 is not updated
320: nothing. tickupdate() is not called, since every 8 ticks
321: EGS::databaseUpdate(), update TargetHP, with timestamp=321 !!!!! => Bug
321: EGS::databaseUpdate(), update TargetChaScore1, with timestamp=321 !!!!! => Bug
(remind that we cannot store a timestamp for each DB property, else would be too big to store and to send...)
BTW, this last bug should be very rare, so don't care.
*********** */
pBM->updateBars(dataSetId(), barInfo, gameCycle+1,
CBarManager::HpFlag | CBarManager::StaFlag | CBarManager::SapFlag | CBarManager::FocusFlag);
CBarManager::ChaScore1Flag | CBarManager::ChaScore2Flag | CBarManager::ChaScore3Flag | CBarManager::ChaScore4Flag);
}// updateVisualPropertyBars //
@ -3048,7 +3048,7 @@ KeyChosen:
case CAnimationStateSheet::ElecCastInit:
case CAnimationStateSheet::FearCastInit:
case CAnimationStateSheet::FireCastInit:
case CAnimationStateSheet::HealHPCastInit:
case CAnimationStateSheet::HealChaScore1CastInit:
case CAnimationStateSheet::MadCastInit:
case CAnimationStateSheet::PoisonCastInit:
case CAnimationStateSheet::RootCastInit:
@ -3068,7 +3068,7 @@ KeyChosen:
case CAnimationStateSheet::ElecCastLoop:
case CAnimationStateSheet::FearCastLoop:
case CAnimationStateSheet::FireCastLoop:
case CAnimationStateSheet::HealHPCastLoop:
case CAnimationStateSheet::HealChaScore1CastLoop:
case CAnimationStateSheet::MadCastLoop:
case CAnimationStateSheet::PoisonCastLoop:
case CAnimationStateSheet::RootCastLoop:
@ -3088,7 +3088,7 @@ KeyChosen:
case CAnimationStateSheet::ElecCastEnd:
case CAnimationStateSheet::FearCastEnd:
case CAnimationStateSheet::FireCastEnd:
case CAnimationStateSheet::HealHPCastEnd:
case CAnimationStateSheet::HealChaScore1CastEnd:
case CAnimationStateSheet::MadCastEnd:
case CAnimationStateSheet::PoisonCastEnd:
case CAnimationStateSheet::RootCastEnd:
@ -3111,7 +3111,7 @@ KeyChosen:
case CAnimationStateSheet::ElecCastFail:
case CAnimationStateSheet::FearCastFail:
case CAnimationStateSheet::FireCastFail:
case CAnimationStateSheet::HealHPCastFail:
case CAnimationStateSheet::HealChaScore1CastFail:
case CAnimationStateSheet::MadCastFail:
case CAnimationStateSheet::PoisonCastFail:
case CAnimationStateSheet::RootCastFail:
@ -3684,8 +3684,8 @@ void CCharacterCL::beginCast(const MBEHAV::CBehaviour &behaviour)
case MBEHAV::CAST_FIRE:
setAnim(CAnimationStateSheet::FireCastInit);
break;
case MBEHAV::CAST_HEALHP:
setAnim(CAnimationStateSheet::HealHPCastInit);
case MBEHAV::CAST_HEALChaScore1:
setAnim(CAnimationStateSheet::HealChaScore1CastInit);
break;
case MBEHAV::CAST_MAD:
setAnim(CAnimationStateSheet::MadCastInit);
@ -3743,8 +3743,8 @@ void CCharacterCL::endCast(const MBEHAV::CBehaviour &behaviour, const MBEHAV::CB
case MBEHAV::CAST_FIRE:
setAnim(CAnimationStateSheet::FireCastEnd);
break;
case MBEHAV::CAST_HEALHP:
setAnim(CAnimationStateSheet::HealHPCastEnd);
case MBEHAV::CAST_HEALChaScore1:
setAnim(CAnimationStateSheet::HealChaScore1CastEnd);
break;
case MBEHAV::CAST_MAD:
setAnim(CAnimationStateSheet::MadCastEnd);
@ -4528,23 +4528,23 @@ bool CCharacterCL::isCurrentBehaviourAttackEnd() const
// ***************************************************************************
void CCharacterCL::applyBehaviourFlyingHPs(const CBehaviourContext &bc, const MBEHAV::CBehaviour &behaviour,
void CCharacterCL::applyBehaviourFlyingChaScore1s(const CBehaviourContext &bc, const MBEHAV::CBehaviour &behaviour,
const vector<double> &targetHitDates)
{
nlassert(targetHitDates.size()==bc.Targets.Targets.size());
if(!bc.Targets.Targets.empty())
{
if(behaviour.DeltaHP != 0)
if(behaviour.DeltaChaScore1 != 0)
{
CRGBA deltaHPColor(0, 0, 0);
CRGBA deltaChaScore1Color(0, 0, 0);
// if it's a hit
if( behaviour.DeltaHP < 0 )
if( behaviour.DeltaChaScore1 < 0 )
{
// if the behaviour is casted by the user
if( slot() == 0 )
{
deltaHPColor = ClientCfg.SystemInfoParams["dgm"].Color;
deltaChaScore1Color = ClientCfg.SystemInfoParams["dgm"].Color;
}
else
// if the behaviour is casted by an entity that target the user
@ -4555,27 +4555,27 @@ void CCharacterCL::applyBehaviourFlyingHPs(const CBehaviourContext &bc, const MB
{
// if actor is player : use pvp color
if( actor->isPlayer() )
deltaHPColor = ClientCfg.SystemInfoParams["dgp"].Color;
deltaChaScore1Color = ClientCfg.SystemInfoParams["dgp"].Color;
else
deltaHPColor = ClientCfg.SystemInfoParams["dg"].Color;
deltaChaScore1Color = ClientCfg.SystemInfoParams["dg"].Color;
}
}
else
{
deltaHPColor = CRGBA(127,127,127);
deltaChaScore1Color = CRGBA(127,127,127);
}
}
else
{
deltaHPColor = CRGBA(0,220,0);
deltaChaScore1Color = CRGBA(0,220,0);
}
// Set the delta HP
// Set the delta ChaScore1
for (size_t i=0; i<bc.Targets.Targets.size(); ++i)
{
CEntityCL *target2 = EntitiesMngr.entity(bc.Targets.Targets[i].TargetSlot);
if(target2)
target2->addHPOutput(behaviour.DeltaHP, deltaHPColor, float(targetHitDates[i]-TimeInSec));
target2->addChaScore1Output(behaviour.DeltaChaScore1, deltaChaScore1Color, float(targetHitDates[i]-TimeInSec));
}
}
}
@ -4724,7 +4724,7 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual
updateCurrentAttack();
if (isCurrentBehaviourAttackEnd())
{
// retrieve target hit dates, so flying HPs have the correct ones
// retrieve target hit dates, so flying ChaScore1s have the correct ones
performCurrentAttackEnd(bc, selfSpell && isOffensif, targetHitDates, combatAnimState);
}
@ -4752,7 +4752,7 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual
case MBEHAV::CAST_ELEC:
case MBEHAV::CAST_FEAR:
case MBEHAV::CAST_FIRE:
case MBEHAV::CAST_HEALHP:
case MBEHAV::CAST_HEALChaScore1:
case MBEHAV::CAST_MAD:
case MBEHAV::CAST_POISON:
case MBEHAV::CAST_ROOT:
@ -4792,8 +4792,8 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual
default:
break;
}
// DeltaHP
applyBehaviourFlyingHPs(bc, behaviour, targetHitDates);
// DeltaChaScore1
applyBehaviourFlyingChaScore1s(bc, behaviour, targetHitDates);
}
// This is a behaviour for the combat.
else if(behaviour.isCombat() || behaviour.isCreatureAttack())
@ -4838,8 +4838,8 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual
UserControls.resetSmoothCameraDeltaYaw();
}
// DeltaHP
applyBehaviourFlyingHPs(bc, behaviour, targetHitDates);
// DeltaChaScore1
applyBehaviourFlyingChaScore1s(bc, behaviour, targetHitDates);
}
// Emote
else if(behaviour.isEmote())
@ -4901,11 +4901,11 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual
break;
// Extracting Begin
case MBEHAV::EXTRACTING:
// DeltaHP
// DeltaChaScore1
if(target)
if(behaviour.DeltaHP != 0)
target->addHPOutput(behaviour.DeltaHP,CRGBA(0,220,0));
// If receiving a new DeltaHP in the current extraction, don't reset the animation
if(behaviour.DeltaChaScore1 != 0)
target->addChaScore1Output(behaviour.DeltaChaScore1,CRGBA(0,220,0));
// If receiving a new DeltaChaScore1 in the current extraction, don't reset the animation
if ( previousBehaviour.Behaviour != _CurrentBehaviour.Behaviour )
setAnim(CAnimationStateSheet::UseInit);
break;
@ -6069,13 +6069,13 @@ void CCharacterCL::updateVisible (const TTime &currentTimeInMs, CEntityCL *targe
}
// Update Modifiers
if(!_HPModifiers.empty())
if(!_ChaScore1Modifiers.empty())
{
HPMD mod;
mod.CHPModifier::operator= (*_HPModifiers.begin());
ChaScore1MD mod;
mod.CChaScore1Modifier::operator= (*_ChaScore1Modifiers.begin());
mod.Time = TimeInSec + mod.DeltaT;
_HPDisplayed.push_back(mod);
_HPModifiers.erase(_HPModifiers.begin());
_ChaScore1Displayed.push_back(mod);
_ChaScore1Modifiers.erase(_ChaScore1Modifiers.begin());
}
// Parent
@ -6121,8 +6121,8 @@ void CCharacterCL::updateSomeClipped (const TTime &currentTimeInMs, CEntityCL *t
}
// Remove Modifiers.
_HPModifiers.clear();
_HPDisplayed.clear();
_ChaScore1Modifiers.clear();
_ChaScore1Displayed.clear();
// Parent
CEntityCL::updateSomeClipped(currentTimeInMs, target);
@ -7602,12 +7602,12 @@ void CCharacterCL::drawName(const NLMISC::CMatrix &mat) // virtual
//---------------------------------------------------
// displayModifiers :
// Display the Hp Bar
// Display the ChaScore1 Bar
//---------------------------------------------------
void CCharacterCL::displayModifiers() // virtual
{
// if none, no op
if( _HPDisplayed.empty())
if( _ChaScore1Displayed.empty())
return;
// **** get the name pos
@ -7631,13 +7631,13 @@ void CCharacterCL::displayModifiers() // virtual
scale = ClientCfg.ConstNameSizeDist / dist;
// **** Display HP modifiers.
// **** Display ChaScore1 modifiers.
CInterfaceManager *pIM= CInterfaceManager::getInstance();
std::list<HPMD>::iterator itTmp;
std::list<HPMD>::iterator it = _HPDisplayed.begin();
while(it != _HPDisplayed.end())
std::list<ChaScore1MD>::iterator itTmp;
std::list<ChaScore1MD>::iterator it = _ChaScore1Displayed.begin();
while(it != _ChaScore1Displayed.end())
{
HPMD &mod = *it;
ChaScore1MD &mod = *it;
//
const float totalDuration= 3.f;
const float noFadeDuration= 1.f;
@ -7646,15 +7646,15 @@ void CCharacterCL::displayModifiers() // virtual
{
itTmp = it;
++it;
_HPDisplayed.erase(itTmp);
_ChaScore1Displayed.erase(itTmp);
}
else if (TimeInSec >= mod.Time)
{
ucstring hpModifier;
ucstring ChaScore1Modifier;
if (mod.Text.empty())
hpModifier = ucstring(toString("%d", mod.Value));
ChaScore1Modifier = ucstring(toString("%d", mod.Value));
else
hpModifier = mod.Text;
ChaScore1Modifier = mod.Text;
double t = TimeInSec-mod.Time;
// for character, keep the deltaZ the first time it is displayed, and apply the same each frame
// (avoid Z movement of the flying text because of animation)
@ -7669,11 +7669,11 @@ void CCharacterCL::displayModifiers() // virtual
else
mod.Color.A= 255-(uint8)((t-noFadeDuration)*255.0/fadeDuration);
// Display the hp modifier. display with a X offset according if user or not, for more readability
// Display the ChaScore1 modifier. display with a X offset according if user or not, for more readability
sint deltaX= -pIM->FlyingTextManager.getOffsetXForCharacter();
if(UserEntity && UserEntity->slot()==slot())
deltaX*= -1;
pIM->FlyingTextManager.addFlyingText(&mod, hpModifier, pos, mod.Color, scale, deltaX);
pIM->FlyingTextManager.addFlyingText(&mod, ChaScore1Modifier, pos, mod.Color, scale, deltaX);
// Next
++it;
@ -10035,7 +10035,7 @@ NLMISC_COMMAND(attack, "simulate an attack", "<slot> <intensity> <hit_type> <loc
target.Info = dsPower | (dsType << 3);
bc.Targets.Targets.push_back(target);
bc.BehavTime = TimeInSec;
bc.Behav.DeltaHP = -20;
bc.Behav.DeltaChaScore1 = -20;
entity->applyBehaviour(bc);
return true;
}
@ -10088,7 +10088,7 @@ NLMISC_COMMAND(rangeAttack, "simulate a range attack", "<slot> [intensity] [loca
if (!target) return false;
double dist = (target->pos() - entity->pos()).norm();
bc.Targets.Targets.push_back(CMultiTarget::CTarget(targetSlot, false, (uint8) ceilf((float) (dist / MULTI_TARGET_DISTANCE_UNIT))));
bc.Behav.DeltaHP = -10;
bc.Behav.DeltaChaScore1 = -10;
entity->applyBehaviour(bc);
return true;
}
@ -10160,7 +10160,7 @@ NLMISC_COMMAND(creatureAttack, "simulate a creature attack (2 attaques per creat
}
bc.Behav.CreatureAttack2.HitType = hitType;
bc.BehavTime = TimeInSec;
bc.Behav.DeltaHP = -15;
bc.Behav.DeltaChaScore1 = -15;
caster->applyBehaviour(bc);
return true;
}

View file

@ -161,7 +161,7 @@ public:
/// Display the entity name.
virtual void displayName();
/// Display the Hp Modifiers
/// Display the ChaScore1 Modifiers
virtual void displayModifiers();
/// Draw Path
virtual void drawPath();
@ -1062,8 +1062,8 @@ private:
// remove attached fxs that depends on another slot when it has been removed
void updateAttachedFXListForSlotRemoved(std::list<CAttachedFX::TSmartPtr> &fxList, const CLFECOMMON::TCLEntityId &slotRemoved);
// apply the flying HP related to behaviour
void applyBehaviourFlyingHPs(const CBehaviourContext &bc, const MBEHAV::CBehaviour &behaviour, const std::vector<double> &targetHitDates);
// apply the flying ChaScore1 related to behaviour
void applyBehaviourFlyingChaScore1s(const CBehaviourContext &bc, const MBEHAV::CBehaviour &behaviour, const std::vector<double> &targetHitDates);
protected:
// retrieve attack from an id and a list of attack lists filenames

View file

@ -158,7 +158,7 @@ public:
ElecCastInit,
FearCastInit,
FireCastInit,
HealHPCastInit,
HealChaScore1CastInit,
MadCastInit,
PoisonCastInit,
RootCastInit,
@ -174,7 +174,7 @@ public:
ElecCastLoop,
FearCastLoop,
FireCastLoop,
HealHPCastLoop,
HealChaScore1CastLoop,
MadCastLoop,
PoisonCastLoop,
RootCastLoop,
@ -190,7 +190,7 @@ public:
ElecCastFail,
FearCastFail,
FireCastFail,
HealHPCastFail,
HealChaScore1CastFail,
MadCastFail,
PoisonCastFail,
RootCastFail,
@ -206,7 +206,7 @@ public:
ElecCastEnd,
FearCastEnd,
FireCastEnd,
HealHPCastEnd,
HealChaScore1CastEnd,
MadCastEnd,
PoisonCastEnd,
RootCastEnd,

View file

@ -838,8 +838,8 @@ bool CItemSheet::hasCharacRequirement(uint itemLevel, CHARACTERISTICS::TCharacte
case ITEM_TYPE::MEDIUM_SLEEVES:
case ITEM_TYPE::MEDIUM_VEST:
case ITEM_TYPE::BUCKLER:
// Constitution requirement
caracType= CHARACTERISTICS::constitution;
// Cha1 requirement
caracType= CHARACTERISTICS::cha1;
caracValue= itemLevel / 1.5f;
return true;
case ITEM_TYPE::HEAVY_BOOTS:
@ -849,8 +849,8 @@ bool CItemSheet::hasCharacRequirement(uint itemLevel, CHARACTERISTICS::TCharacte
case ITEM_TYPE::HEAVY_VEST:
case ITEM_TYPE::HEAVY_HELMET:
case ITEM_TYPE::SHIELD:
// Constitution requirement
caracType= CHARACTERISTICS::constitution;
// Cha1 requirement
caracType= CHARACTERISTICS::cha1;
caracValue= float((sint)itemLevel - 10);
caracValue= max(caracValue, 0.f);
return true;
@ -865,14 +865,14 @@ bool CItemSheet::hasCharacRequirement(uint itemLevel, CHARACTERISTICS::TCharacte
switch( ItemType )
{
case ITEM_TYPE::MAGICIAN_STAFF:
// Intelligence requirement
caracType= CHARACTERISTICS::intelligence;
// Cha3 requirement
caracType= CHARACTERISTICS::cha3;
caracValue= float((sint)itemLevel - 10);
caracValue= max(caracValue, 0.f);
return true;
default:
// Strength requirement
caracType= CHARACTERISTICS::strength;
// Cha2 requirement
caracType= CHARACTERISTICS::cha2;
caracValue= float((sint)itemLevel - 10);
caracValue= max(caracValue, 0.f);
return true;
@ -881,7 +881,7 @@ bool CItemSheet::hasCharacRequirement(uint itemLevel, CHARACTERISTICS::TCharacte
// **** RANGE_WEAPON
case ITEMFAMILY::RANGE_WEAPON:
caracType= CHARACTERISTICS::well_balanced;
caracType= CHARACTERISTICS::cha2_reg;
caracValue= float((sint)itemLevel - 10);
caracValue= max(caracValue, 0.f);
return true;

View file

@ -40,9 +40,9 @@ void CPactSheet::build(const NLGEORGES::UFormElm &root)
const UFormElm *node;
// variable is used for calculate pact effect in differential between pacts type
sint16 LoseHitPoints = 0;
sint16 LoseStamina = 0;
sint16 LoseSap = 0;
sint16 LoseChaScore1 = 0;
sint16 LoseChaScore2 = 0;
sint16 LoseChaScore3 = 0;
sint16 LoseSkills = 0;
sint16 value;
@ -54,20 +54,20 @@ void CPactSheet::build(const NLGEORGES::UFormElm &root)
if( node )
{
node->getValueByName( value, "HitPoints" );
value = 0 - value - LoseHitPoints;
LoseHitPoints += value;
PactLose[ i ].LoseHitPointsLevel = value;
node->getValueByName( value, "ChaScore1" );
value = 0 - value - LoseChaScore1;
LoseChaScore1 += value;
PactLose[ i ].LoseChaScore1Level = value;
node->getValueByName( value, "Stamina" );
value = 0 - value - LoseStamina;
LoseStamina += value;
PactLose[ i ].LoseStaminaLevel = value;
node->getValueByName( value, "ChaScore2" );
value = 0 - value - LoseChaScore2;
LoseChaScore2 += value;
PactLose[ i ].LoseChaScore2Level = value;
node->getValueByName( value, "Sap" );
value = 0 - value - LoseSap;
LoseSap += value;
PactLose[ i ].LoseSapLevel = value;
node->getValueByName( value, "ChaScore3" );
value = 0 - value - LoseChaScore3;
LoseChaScore3 += value;
PactLose[ i ].LoseChaScore3Level = value;
node->getValueByName( value, "Skills" );
value = 0 - value - LoseSkills;

View file

@ -27,18 +27,18 @@ class CPactSheet : public CEntitySheet
public:
struct SPact
{
uint16 LoseHitPointsLevel;
uint16 LoseStaminaLevel;
uint16 LoseSapLevel;
uint16 LoseChaScore1Level;
uint16 LoseChaScore2Level;
uint16 LoseChaScore3Level;
uint16 LoseSkillsLevel;
float Duration;
std::string Name;
void serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
{
f.serial( LoseHitPointsLevel);
f.serial( LoseStaminaLevel );
f.serial( LoseSapLevel );
f.serial( LoseChaScore1Level);
f.serial( LoseChaScore2Level );
f.serial( LoseChaScore3Level );
f.serial( LoseSkillsLevel );
f.serial( Duration );
f.serial( Name );

View file

@ -695,7 +695,7 @@ NLMISC_COMMAND(bugReport, "Call the bug report tool with dump", "<AddScreenshot>
if (ClientCfg.Local)
sys += "ShardName OFFLINE ";
FILE *fp = nlfopen (getLogDirectory() + "bug_report.txt", "wb");
FILE *fp = fopen (std::string(getLogDirectory() + "bug_report.txt").c_str(), "wb");
if (fp != NULL)
{
string res = addSlashR(getDebugInformation());
@ -2440,7 +2440,7 @@ NLMISC_COMMAND(mode, "Change the mode for an entity in a slot", "<Slot> <Mode> [
return true;
}
NLMISC_COMMAND(behaviour, "Change the behaviour for an entity in a slot", "<Slot> <Behaviour> [<Attack Intensity>] [<Impact Intensity>] [<delta HP>] [dt(tick)]")
NLMISC_COMMAND(behaviour, "Change the behaviour for an entity in a slot", "<Slot> <Behaviour> [<Attack Intensity>] [<Impact Intensity>] [<delta ChaScore1>] [dt(tick)]")
{
// Check parameters.
if(args.size() < 2 || args.size() > 6)
@ -2505,7 +2505,7 @@ NLMISC_COMMAND(behaviour, "Change the behaviour for an entity in a slot", "<Slot
behaviour.Combat.ImpactIntensity = impactIntensity;
}
if(args.size() > 4)
fromString(args[4], behaviour.DeltaHP);
fromString(args[4], behaviour.DeltaChaScore1);
}
// get the dt
sint32 dt= 10;
@ -4296,10 +4296,10 @@ NLMISC_COMMAND(debugItemInfo, "simulate a ItemInfo received from server", "itemS
itemInfo.ParryModifier= -10;
itemInfo.AdversaryDodgeModifier= 666;
itemInfo.AdversaryParryModifier= 333;
itemInfo.HpBuff= 12;
itemInfo.SapBuff= -14;
itemInfo.StaBuff= 0;
itemInfo.FocusBuff= 1;
itemInfo.ChaScore1Buff= 12;
itemInfo.ChaScore3Buff= -14;
itemInfo.ChaScore2Buff= 0;
itemInfo.ChaScore4Buff= 1;
itemInfo.MagicProtection[0]= PROTECTION_TYPE::Electricity;
itemInfo.MagicProtectionFactor[0]= 43;
itemInfo.MagicProtection[1]= PROTECTION_TYPE::Shockwave;

View file

@ -86,7 +86,7 @@ namespace NL3D
class CEntitySheet;
class CEntityCL;
struct CAttackInfo;
class CAttackInfo;
class CItemSheet;
@ -261,7 +261,7 @@ public:
/// Display the entity name.
virtual void displayName() {}
/// Display the Hp Modifiers
/// Display the ChaScore1 Modifiers
virtual void displayModifiers() {}
/// Draw Path
virtual void drawPath() {}
@ -631,9 +631,9 @@ public:
/// Return true if the character is really dead. With no lag because of anim or LCT
virtual bool isReallyDead() const {return false;}
// Add hit points gain/lost by this entity.
void addHPOutput(sint16 hp, NLMISC::CRGBA color, float dt=0.0f) { if(_HPModifiers.size()<20) _HPModifiers.push_back(CHPModifier(hp,color,dt));}
void addHPOutput(const ucstring &text, NLMISC::CRGBA color, float dt=0.0f) { if(_HPModifiers.size()<20 && !text.empty()) _HPModifiers.push_back(CHPModifier(text,color,dt));}
// Add ChaScore1 gain/lost by this entity.
void addChaScore1Output(sint16 ChaScore1, NLMISC::CRGBA color, float dt=0.0f) { if(_ChaScore1Modifiers.size()<20) _ChaScore1Modifiers.push_back(CChaScore1Modifier(ChaScore1,color,dt));}
void addChaScore1Output(const ucstring &text, NLMISC::CRGBA color, float dt=0.0f) { if(_ChaScore1Modifiers.size()<20 && !text.empty()) _ChaScore1Modifiers.push_back(CChaScore1Modifier(text,color,dt));}
/// Return the entity sheet scale. (return 1.0 if there is any problem).
virtual float getSheetScale() const {return 1.0f;}
@ -984,33 +984,33 @@ protected:
// Local selection box
NLMISC::CAABBox _LocalSelectBox;
// List of modifiers taken by this entity.
class CHPModifier
class CChaScore1Modifier
{
public:
CHPModifier() {}
virtual ~CHPModifier() {}
CHPModifier (sint16 value, NLMISC::CRGBA color, float dt) : Value(value), Color(color), DeltaT(dt) {}
CHPModifier (const ucstring &text, NLMISC::CRGBA color, float dt) : Text(text), Color(color), DeltaT(dt) {}
CChaScore1Modifier() {}
virtual ~CChaScore1Modifier() {}
CChaScore1Modifier (sint16 value, NLMISC::CRGBA color, float dt) : Value(value), Color(color), DeltaT(dt) {}
CChaScore1Modifier (const ucstring &text, NLMISC::CRGBA color, float dt) : Text(text), Color(color), DeltaT(dt) {}
sint16 Value; // If Text.empty(), take the Value
ucstring Text;
NLMISC::CRGBA Color;
float DeltaT;
};
std::list<CHPModifier> _HPModifiers;
std::list<CChaScore1Modifier> _ChaScore1Modifiers;
//
class HPMD : public CHPModifier
class ChaScore1MD : public CChaScore1Modifier
{
public:
double Time;
// DeltaZ between pos() and namePos(). computed only one time
float DeltaZ;
HPMD()
ChaScore1MD()
{
DeltaZ= -FLT_MAX;
}
};
std::list<HPMD> _HPDisplayed;
std::list<ChaScore1MD> _ChaScore1Displayed;
// The transparency factor
float _TranspFactor; // 0 - opaque 1 - transparent

View file

@ -215,13 +215,13 @@ void CForageSourceCL::updateClipped (const NLMISC::TTime &currentTimeInMs, CEnti
void CForageSourceCL::updateVisible(const NLMISC::TTime &time, CEntityCL *target)
{
// Update Modifiers
if(!_HPModifiers.empty())
if(!_ChaScore1Modifiers.empty())
{
HPMD mod;
mod.CHPModifier::operator= (*_HPModifiers.begin());
ChaScore1MD mod;
mod.CChaScore1Modifier::operator= (*_ChaScore1Modifiers.begin());
mod.Time = TimeInSec;
_HPDisplayed.push_back(mod);
_HPModifiers.erase(_HPModifiers.begin());
_ChaScore1Displayed.push_back(mod);
_ChaScore1Modifiers.erase(_ChaScore1Modifiers.begin());
}
// parent
@ -581,7 +581,7 @@ void CForageSourceCL::updateVisualPropertyTarget(const NLMISC::TGameCycle &/* ga
void CForageSourceCL::displayModifiers()
{
// if none, no op
if( _HPDisplayed.empty())
if( _ChaScore1Displayed.empty())
return;
// **** get the name pos
@ -598,13 +598,13 @@ void CForageSourceCL::displayModifiers()
scale = ClientCfg.ConstNameSizeDist / dist;
// **** Display HP modifiers.
// **** Display ChaScore1 modifiers.
CInterfaceManager *pIM= CInterfaceManager::getInstance();
std::list<HPMD>::iterator itTmp;
std::list<HPMD>::iterator it = _HPDisplayed.begin();
while(it != _HPDisplayed.end())
std::list<ChaScore1MD>::iterator itTmp;
std::list<ChaScore1MD>::iterator it = _ChaScore1Displayed.begin();
while(it != _ChaScore1Displayed.end())
{
HPMD &mod = *it;
ChaScore1MD &mod = *it;
//
const float totalDuration= 3.f;
const float noFadeDuration= 1.f;
@ -613,13 +613,13 @@ void CForageSourceCL::displayModifiers()
{
itTmp = it;
++it;
_HPDisplayed.erase(itTmp);
_ChaScore1Displayed.erase(itTmp);
}
else
{
uint16 qttyDelta = ((uint16)mod.Value) & 0xFF;
uint16 qlty = ((uint16)mod.Value) >> 8;
ucstring hpModifier = ucstring(toString("%u ", qttyDelta) + CI18N::get("uittQualityAbbrev") + toString(" %u", qlty));
ucstring ChaScore1Modifier = ucstring(toString("%u ", qttyDelta) + CI18N::get("uittQualityAbbrev") + toString(" %u", qlty));
double t = TimeInSec-mod.Time;
// Compute the position for the Modifier.
CVector pos= namePos + CVector(0.0f, 0.0f, 0.3f+(float)t*1.0f/totalDuration);
@ -636,7 +636,7 @@ void CForageSourceCL::displayModifiers()
color.A= 255-(uint8)((t-noFadeDuration)*255.0/fadeDuration);
// Display the name
pIM->FlyingTextManager.addFlyingText(&mod, hpModifier, pos, color, scale);
pIM->FlyingTextManager.addFlyingText(&mod, ChaScore1Modifier, pos, color, scale);
// Next
++it;

View file

@ -3968,8 +3968,8 @@ static void fillPlayerBarText(ucstring &str, const string &dbScore, SCORES::TSco
}
// ***************************************************************************
// Life
class CHandlerPlayerTTLife : public IActionHandler
// ChaScore1
class CHandlerPlayerTTChaScore1 : public IActionHandler
{
public:
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
@ -3977,16 +3977,16 @@ public:
CInterfaceManager *pIM= CInterfaceManager::getInstance();
ucstring str;
fillPlayerBarText(str, "HP", SCORES::hit_points, "uittPlayerLifeFormat");
fillPlayerBarText(str, "ChaScore1", SCORES::cha_score1, "uittPlayerChaScore1Format");
CWidgetManager::getInstance()->setContextHelpText(str);
}
};
REGISTER_ACTION_HANDLER(CHandlerPlayerTTLife, "player_tt_life");
REGISTER_ACTION_HANDLER(CHandlerPlayerTTChaScore1, "player_tt_cha_score1");
// ***************************************************************************
// Stamina
class CHandlerPlayerTTStamina : public IActionHandler
// ChaScore2
class CHandlerPlayerTTChaScore2 : public IActionHandler
{
public:
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
@ -3994,16 +3994,16 @@ public:
CInterfaceManager *pIM= CInterfaceManager::getInstance();
ucstring str;
fillPlayerBarText(str, "STA", SCORES::stamina, "uittPlayerStaminaFormat");
fillPlayerBarText(str, "ChaScore2", SCORES::cha_score1, "uittPlayerChaScore2Format");
CWidgetManager::getInstance()->setContextHelpText(str);
}
};
REGISTER_ACTION_HANDLER(CHandlerPlayerTTStamina, "player_tt_stamina");
REGISTER_ACTION_HANDLER(CHandlerPlayerTTChaScore2, "player_tt_cha_score2");
// ***************************************************************************
// Sap
class CHandlerPlayerTTSap : public IActionHandler
// ChaScore3
class CHandlerPlayerTTChaScore3 : public IActionHandler
{
public:
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
@ -4011,16 +4011,16 @@ public:
CInterfaceManager *pIM= CInterfaceManager::getInstance();
ucstring str;
fillPlayerBarText(str, "SAP", SCORES::sap, "uittPlayerSapFormat");
fillPlayerBarText(str, "ChaScore3", SCORES::cha_score3, "uittPlayerChaScore3Format");
CWidgetManager::getInstance()->setContextHelpText(str);
}
};
REGISTER_ACTION_HANDLER(CHandlerPlayerTTSap, "player_tt_sap");
REGISTER_ACTION_HANDLER(CHandlerPlayerTTChaScore3, "player_tt_cha_score3");
// ***************************************************************************
// Focus
class CHandlerPlayerTTFocus : public IActionHandler
// ChaScore4
class CHandlerPlayerTTChaScore4 : public IActionHandler
{
public:
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
@ -4028,12 +4028,12 @@ public:
CInterfaceManager *pIM= CInterfaceManager::getInstance();
ucstring str;
fillPlayerBarText(str, "FOCUS", SCORES::focus, "uittPlayerFocusFormat");
fillPlayerBarText(str, "ChaScore4", SCORES::cha_score4, "uittPlayerChaScore4Format");
CWidgetManager::getInstance()->setContextHelpText(str);
}
};
REGISTER_ACTION_HANDLER(CHandlerPlayerTTFocus, "player_tt_focus");
REGISTER_ACTION_HANDLER(CHandlerPlayerTTChaScore4, "player_tt_cha_score4");
// ***************************************************************************
// Bulk: NB: work for player / animal
@ -4179,7 +4179,7 @@ public:
CRGBA color = CRGBA::stringToRGBA(getParam(sParams, "color").c_str());
if (entity < 256)
EntitiesMngr.entity (entity)->addHPOutput (CI18N::get (text), color);
EntitiesMngr.entity (entity)->addChaScore1Output (CI18N::get (text), color);
}
};
REGISTER_ACTION_HANDLER(CHandlerEntityFlyingText, "entity_flying_text");

View file

@ -1389,8 +1389,8 @@ void getBuffText(CDBCtrlSheet *item, ucstring &itemText)
// retrieve the current itemInfo
const CClientItemInfo &itemInfo= getInventory().getItemInfo(getInventory().getItemSlotId(item) );
const string valIds[]={"Hp", "Sap", "Sta", "Focus"};
sint32 vals[]= {itemInfo.HpBuff, itemInfo.SapBuff, itemInfo.StaBuff, itemInfo.FocusBuff};
const string valIds[]={"ChaScore1", "ChaScore3", "ChaScore2", "ChaScore4"};
sint32 vals[]= {itemInfo.ChaScore1Buff, itemInfo.ChaScore3Buff, itemInfo.ChaScore2Buff, itemInfo.ChaScore4Buff};
uint numVals= sizeof(vals) / sizeof(vals[0]);
ucstring bufInfo;
@ -1840,7 +1840,7 @@ void getArmorBonus(CDBCtrlSheet *item, ucstring &itemText, const CItemSheet*pIS)
level = item->getQuality() / 2;
if (pIS->Armor.ArmorType == ARMORTYPE::HEAVY || pIS->Armor.ArmorType == ARMORTYPE::MEDIUM)
armor_bonus = "@{FFFF}(+@{2F2F}" + toString(level) + " @{FFFF}" + CI18N::get("uiHP") + ")";
armor_bonus = "@{FFFF}(+@{2F2F}" + toString(level) + " @{FFFF}" + CI18N::get("uiChaScore1") + ")";
strFindReplace(itemText, "%armor_bonus", armor_bonus);
}
@ -2596,9 +2596,9 @@ static void setupPactHelp(CSheetHelpSetup &setup)
pactText= CI18N::get("uihelpPactFormat");
strFindReplace(pactText, "%lvl", toString(pactLevel));
strFindReplace(pactText, "%hp", toString(pactLose.LoseHitPointsLevel));
strFindReplace(pactText, "%sta", toString(pactLose.LoseStaminaLevel));
strFindReplace(pactText, "%sap", toString(pactLose.LoseSapLevel));
strFindReplace(pactText, "%ChaScore1", toString(pactLose.LoseChaScore1Level));
strFindReplace(pactText, "%ChaScore2", toString(pactLose.LoseChaScore2Level));
strFindReplace(pactText, "%ChaScore3", toString(pactLose.LoseChaScore3Level));
strFindReplace(pactText, "%skill", toString(pactLose.LoseSkillsLevel));
// **** setup the text
@ -3937,15 +3937,13 @@ public:
s += getSystemInformation();
string progname;
std::string moduleName;
char name[1024] = "";
#ifdef NL_OS_WINDOWS
wchar_t name[1024];
GetModuleFileNameW(NULL, name, 1023);
moduleName = wideToUtf8(name);
GetModuleFileName (NULL, name, 1023);
#else
// TODO for Linux
#endif
progname = CFile::getFilename(moduleName);
progname = CFile::getFilename(name);
progname += " ";
progname += "Statistic Report";

View file

@ -97,7 +97,7 @@ void CBarManager::CBarDataEntry::resetDB()
// ***************************************************************************
void CBarManager::CBarDataEntry::connectDB(const std::string &baseDBin, const std::string &baseDBout, const std::string &presentDB,
const std::string &hpDB, const std::string &sapDB, const std::string &staDB, const std::string &focusDB)
const std::string &ChaScore1DB, const std::string &ChaScore3DB, const std::string &ChaScore2DB, const std::string &ChaScore4DB)
{
CInterfaceManager *pIM= CInterfaceManager::getInstance();
@ -110,27 +110,27 @@ void CBarManager::CBarDataEntry::connectDB(const std::string &baseDBin, const st
UIDIn= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+"UID", false);
if(!presentDB.empty())
PresentIn= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+presentDB, false);
if(!hpDB.empty())
ScoreIn[SCORES::hit_points]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+hpDB, false);
if(!sapDB.empty())
ScoreIn[SCORES::sap]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+sapDB, false);
if(!staDB.empty())
ScoreIn[SCORES::stamina]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+staDB, false);
if(!focusDB.empty())
ScoreIn[SCORES::focus]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+focusDB, false);
if(!ChaScore1DB.empty())
ScoreIn[SCORES::cha_score1]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+ChaScore1DB, false);
if(!ChaScore3DB.empty())
ScoreIn[SCORES::cha_score3]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+ChaScore3DB, false);
if(!ChaScore2DB.empty())
ScoreIn[SCORES::cha_score2]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+ChaScore2DB, false);
if(!ChaScore4DB.empty())
ScoreIn[SCORES::cha_score4]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBin+ChaScore4DB, false);
}
// try to connect each output entry (don't create)
if(!baseDBout.empty())
{
if(!hpDB.empty())
ScoreOut[SCORES::hit_points]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+hpDB, false);
if(!sapDB.empty())
ScoreOut[SCORES::sap]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+sapDB, false);
if(!staDB.empty())
ScoreOut[SCORES::stamina]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+staDB, false);
if(!focusDB.empty())
ScoreOut[SCORES::focus]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+focusDB, false);
if(!ChaScore1DB.empty())
ScoreOut[SCORES::cha_score1]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+ChaScore1DB, false);
if(!ChaScore3DB.empty())
ScoreOut[SCORES::cha_score3]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+ChaScore3DB, false);
if(!ChaScore2DB.empty())
ScoreOut[SCORES::cha_score2]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+ChaScore2DB, false);
if(!ChaScore4DB.empty())
ScoreOut[SCORES::cha_score4]= NLGUI::CDBManager::getInstance()->getDbProp(baseDBout+ChaScore4DB, false);
}
}
@ -207,28 +207,28 @@ void CBarManager::initInGame()
// *** create connexion to the Local Output database
for(i=0;i<_EntryBars[TeamMemberType].size();i++)
{
// don't connect FOCUS, since not setuped by SERVER
// don't connect ChaScore4, since not setuped by SERVER
_EntryBars[TeamMemberType][i].connectDB(
toString("SERVER:GROUP:%d:",i),
toString("UI:VARIABLES:BARS:TEAM:%d:",i),
"PRESENT",
"HP", "SAP", "STA", "");
"ChaScore1", "ChaScore3", "ChaScore2", "");
}
for(i=0;i<_EntryBars[AnimalType].size();i++)
{
// don't connect STA, SAP and FOCUS for animal, since they don't have
// don't connect ChaScore2, ChaScore3 and ChaScore4 for animal, since they don't have
_EntryBars[AnimalType][i].connectDB(
toString("SERVER:PACK_ANIMAL:BEAST%d:",i),
toString("UI:VARIABLES:BARS:ANIMAL:%d:",i),
"STATUS",
"HP", "", "", "");
"ChaScore1", "", "", "");
}
nlassert(_EntryBars[TargetType].size()==1);
_EntryBars[TargetType][0].connectDB(
"SERVER:TARGET:BARS:",
"UI:VARIABLES:BARS:TARGET:",
"", // no present flag for target (not so important)
"HP", "SAP", "STA", "FOCUS");
"ChaScore1", "ChaScore3", "ChaScore2", "ChaScore4");
// NB: don't connect the DB for entities, since CEntityCL read it directly from getBarsByEntityId() (simpler and faster)
@ -237,30 +237,30 @@ void CBarManager::initInGame()
nlctassert(MaxEntryType==4);
nlctassert(SCORES::NUM_SCORES==4);
// For each entry type, tells what score they can affect (see DB connection above)
_EntryScoreFlags[EntityType]= HpFlag | SapFlag | StaFlag | FocusFlag; // all
_EntryScoreFlags[TeamMemberType]= HpFlag | SapFlag | StaFlag; // anything but focus
_EntryScoreFlags[AnimalType]= HpFlag; // Hp only
_EntryScoreFlags[TargetType]= HpFlag | SapFlag | StaFlag | FocusFlag; // all
_EntryScoreFlags[EntityType]= ChaScore1Flag | ChaScore3Flag | ChaScore2Flag | ChaScore4Flag; // all
_EntryScoreFlags[TeamMemberType]= ChaScore1Flag | ChaScore3Flag | ChaScore2Flag; // anything but ChaScore4
_EntryScoreFlags[AnimalType]= ChaScore1Flag; // ChaScore1 only
_EntryScoreFlags[TargetType]= ChaScore1Flag | ChaScore3Flag | ChaScore2Flag | ChaScore4Flag; // all
// *** create connexion for User Bar mgt
// user now can only manage 4 scores
nlctassert(SCORES::NUM_SCORES==4);
// Input max values
_UserScores[SCORES::hit_points].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES0:Max", false);
_UserScores[SCORES::sap].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES2:Max", false);
_UserScores[SCORES::stamina].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES1:Max", false);
_UserScores[SCORES::focus].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES3:Max", false);
_UserScores[SCORES::cha_score1].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES0:Max", false);
_UserScores[SCORES::cha_score3].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES2:Max", false);
_UserScores[SCORES::cha_score2].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES1:Max", false);
_UserScores[SCORES::cha_score3].DBInMax= NLGUI::CDBManager::getInstance()->getDbProp("SERVER:CHARACTER_INFO:SCORES3:Max", false);
// Output real values
_UserScores[SCORES::hit_points].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:HP", false);
_UserScores[SCORES::sap].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:SAP", false);
_UserScores[SCORES::stamina].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:STA", false);
_UserScores[SCORES::focus].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:FOCUS", false);
_UserScores[SCORES::cha_score1].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:ChaScore1", false);
_UserScores[SCORES::cha_score3].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:ChaScore3", false);
_UserScores[SCORES::cha_score2].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:ChaScore2", false);
_UserScores[SCORES::cha_score4].DBOutVal= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:ChaScore4", false);
// Output ratio values
_UserScores[SCORES::hit_points].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:HP_RATIO", false);
_UserScores[SCORES::sap].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:SAP_RATIO", false);
_UserScores[SCORES::stamina].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:STA_RATIO", false);
_UserScores[SCORES::focus].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:FOCUS_RATIO", false);
_UserScores[SCORES::cha_score1].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:ChaScore1_RATIO", false);
_UserScores[SCORES::cha_score3].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:ChaScore3_RATIO", false);
_UserScores[SCORES::cha_score2].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:ChaScore2_RATIO", false);
_UserScores[SCORES::cha_score4].DBOutRatio= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:ChaScore4_RATIO", false);
}
// ***************************************************************************
@ -410,7 +410,7 @@ void CBarManager::updateBars(uint dataSetId, CBarInfo barInfo, TGameCycle serve
if(it==_UIDBars.end())
return;
barInfoLog("BARS: updateBars(dsid=%x, biHP=%d, t=%d, sf=%x", dataSetId, barInfo.Score[SCORES::hit_points], serverTick, scoreFlags);
barInfoLog("BARS: updateBars(dsid=%x, biChaScore1=%d, t=%d, sf=%x", dataSetId, barInfo.Score[SCORES::cha_score1], serverTick, scoreFlags);
// special Case: if the info is for the User (slot 0)
if(dataSetId==_EntryBars[EntityType][0].DataSetId)
@ -585,7 +585,7 @@ CBarManager::CBarInfo CBarManager::getBarsByEntityId(CLFECOMMON::TCLEntityId ent
}
// ***************************************************************************
void CBarManager::setupUserBarInfo(uint8 msgNumber, sint32 hp, sint32 sap, sint32 sta, sint32 focus)
void CBarManager::setupUserBarInfo(uint8 msgNumber, sint32 ChaScore1, sint32 ChaScore3, sint32 ChaScore2, sint32 ChaScore4)
{
/*
Since we are not sure of the message order, use a little counter to discard old messages
@ -614,10 +614,10 @@ void CBarManager::setupUserBarInfo(uint8 msgNumber, sint32 hp, sint32 sap, sint3
_LastUserBarMsgNumber= msgNumber;
// user now can only manage 4 scores
nlctassert(SCORES::NUM_SCORES==4);
_UserScores[SCORES::hit_points].Score= hp;
_UserScores[SCORES::sap].Score= sap;
_UserScores[SCORES::stamina].Score= sta;
_UserScores[SCORES::focus].Score= focus;
_UserScores[SCORES::cha_score1].Score= ChaScore1;
_UserScores[SCORES::cha_score3].Score= ChaScore3;
_UserScores[SCORES::cha_score2].Score= ChaScore2;
_UserScores[SCORES::cha_score4].Score= ChaScore4;
// update actual database now.
for(uint i=0;i<SCORES::NUM_SCORES;i++)
@ -681,7 +681,7 @@ void CBarManager::updateUserBars()
// update (user can only manage 4 scores for now)
nlctassert(SCORES::NUM_SCORES==4);
updateBars(userDataSetId, _UserBarInfo, serverTick, HpFlag | SapFlag | StaFlag | FocusFlag);
updateBars(userDataSetId, _UserBarInfo, serverTick, ChaScore1Flag | ChaScore3Flag | ChaScore2Flag | ChaScore4Flag);
}
}
}

View file

@ -30,7 +30,7 @@ namespace NLMISC{
// ***************************************************************************
/**
* Class that Manage display of Bars (HP, Sta, Sap, Focus)
* Class that Manage display of Bars (ChaScore1, ChaScore2, ChaScore3, ChaScore4)
* Such a manager is necessary because the property are sent in 2 ways:
* - From Visual Property, often more frequently updated, but only if Entity is in Vision AND within
* a certain distance (aka VP threshold which is for instance 30m for Bars)
@ -81,10 +81,10 @@ public:
// Flags
enum TScoreFlag
{
HpFlag= (1<<SCORES::hit_points),
SapFlag= (1<<SCORES::sap),
StaFlag= (1<<SCORES::stamina),
FocusFlag= (1<<SCORES::focus)
ChaScore1Flag= (1<<SCORES::cha_score1),
ChaScore3Flag= (1<<SCORES::cha_score3),
ChaScore2Flag= (1<<SCORES::cha_score2),
ChaScore4Flag= (1<<SCORES::cha_score4)
};
// Bar Info
@ -132,7 +132,7 @@ public:
/** called either by VP or DB receive. NB: no-op if the dataSetId was not added through any of preceding fct
* \param serverTick the server date validity of this info (if too old, skiped)
* \param scoreFlags an ORed of TScoreFlag. if not set, the value is not relevant (eg: Team DB don't precise Focus)
* \param scoreFlags an ORed of TScoreFlag. if not set, the value is not relevant (eg: Team DB don't precise ChaScore4)
*/
void updateBars(uint dataSetId, CBarInfo barInfo, NLMISC::TGameCycle serverTick, uint scoreFlags);
@ -149,15 +149,15 @@ public:
/*
* For Interface Team, Target, and Animal, values are updated in the database:
* UI:VARIABLES:BARS:TEAM:i:HP
* UI:VARIABLES:BARS:ANIMAL:i:HP
* UI:VARIABLES:BARS:TARGET:HP
* UI:VARIABLES:BARS:TEAM:i:ChaScore1
* UI:VARIABLES:BARS:ANIMAL:i:ChaScore1
* UI:VARIABLES:BARS:TARGET:ChaScore1
* They are updated on a updateBars(), addxxx() or delxxxx()
*/
/// Special Message to set the current HP/SAP/STA/FOCUS for the user.
void setupUserBarInfo(uint8 msgNumber, sint32 hp, sint32 sap, sint32 sta, sint32 focus);
/// From last setuped user HP/SAP/STA/FOCUS, and current database MAX, setup the Bars for the user (slot 0) entry
/// Special Message to set the current ChaScore1/ChaScore3/ChaScore2/ChaScore4 for the user.
void setupUserBarInfo(uint8 msgNumber, sint32 ChaScore1, sint32 ChaScore3, sint32 ChaScore2, sint32 ChaScore4);
/// From last setuped user ChaScore1/ChaScore3/ChaScore2/ChaScore4, and current database MAX, setup the Bars for the user (slot 0) entry
void updateUserBars();
sint32 getUserScore(SCORES::TScores score);
@ -231,7 +231,7 @@ private:
void clear();
// connect
void connectDB(const std::string &baseDBin, const std::string &baseDBout, const std::string &presentDB,
const std::string &hpDB, const std::string &sapDB, const std::string &staDB, const std::string &focusDB);
const std::string &ChaScore1DB, const std::string &ChaScore3DB, const std::string &ChaScore2DB, const std::string &ChaScore4DB);
void resetDB();
// flush the value to the DB (only values linked)
void flushDBOut();

View file

@ -135,49 +135,49 @@ int CDBCtrlSheet::luaGetDraggedSheet(CLuaState &ls)
}
// ***************************************************************************
int CDBCtrlSheet::luaGetHpBuff(CLuaState &ls)
int CDBCtrlSheet::luaGetChaScore1Buff(CLuaState &ls)
{
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
uint32 itemSlotId= getInventory().getItemSlotId(ctrlSheet);
CClientItemInfo itemInfo = getInventory().getItemInfo(itemSlotId);
ls.push(itemInfo.HpBuff);
ls.push(itemInfo.ChaScore1Buff);
return 1;
}
// ***************************************************************************
int CDBCtrlSheet::luaGetSapBuff(CLuaState &ls)
int CDBCtrlSheet::luaGetChaScore3Buff(CLuaState &ls)
{
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
uint32 itemSlotId= getInventory().getItemSlotId(ctrlSheet);
CClientItemInfo itemInfo = getInventory().getItemInfo(itemSlotId);
ls.push(itemInfo.SapBuff);
ls.push(itemInfo.ChaScore3Buff);
return 1;
}
// ***************************************************************************
int CDBCtrlSheet::luaGetFocusBuff(CLuaState &ls)
int CDBCtrlSheet::luaGetChaScore4Buff(CLuaState &ls)
{
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
uint32 itemSlotId= getInventory().getItemSlotId(ctrlSheet);
CClientItemInfo itemInfo = getInventory().getItemInfo(itemSlotId);
ls.push(itemInfo.FocusBuff);
ls.push(itemInfo.ChaScore4Buff);
return 1;
}
// ***************************************************************************
int CDBCtrlSheet::luaGetStaBuff(CLuaState &ls)
int CDBCtrlSheet::luaGetChaScore2Buff(CLuaState &ls)
{
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
uint32 itemSlotId= getInventory().getItemSlotId(ctrlSheet);
CClientItemInfo itemInfo = getInventory().getItemInfo(itemSlotId);
ls.push(itemInfo.StaBuff);
ls.push(itemInfo.ChaScore2Buff);
return 1;
}
@ -2428,17 +2428,17 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti
sint costMalus;
CBarManager &bm = *CBarManager::getInstance();
//
pPM->getPhraseHpCost(phrase, totalActionMalus, cost, costMalus);
if (cost > bm.getUserScore(SCORES::hit_points)) forceGrayed = true;
pPM->getPhraseChaScore1Cost(phrase, totalActionMalus, cost, costMalus);
if (cost > bm.getUserScore(SCORES::cha_score1)) forceGrayed = true;
//
pPM->getPhraseSapCost(phrase, totalActionMalus, cost, costMalus);
if (cost > bm.getUserScore(SCORES::sap)) forceGrayed = true;
pPM->getPhraseChaScore3Cost(phrase, totalActionMalus, cost, costMalus);
if (cost > bm.getUserScore(SCORES::cha_score3)) forceGrayed = true;
//
pPM->getPhraseStaCost(phrase, totalActionMalus, cost, costMalus);
if (cost > bm.getUserScore(SCORES::stamina)) forceGrayed = true;
pPM->getPhraseChaScore2Cost(phrase, totalActionMalus, cost, costMalus);
if (cost > bm.getUserScore(SCORES::cha_score2)) forceGrayed = true;
//
pPM->getPhraseFocusCost(phrase, totalActionMalus, cost, costMalus);
if (cost > bm.getUserScore(SCORES::focus)) forceGrayed = true;
pPM->getPhraseChaScore4Cost(phrase, totalActionMalus, cost, costMalus);
if (cost > bm.getUserScore(SCORES::cha_score4)) forceGrayed = true;
}
}
}

View file

@ -280,10 +280,10 @@ public:
REFLECT_STRING ("on_can_drop", getActionOnCanDrop, setActionOnCanDrop);
REFLECT_STRING ("on_can_drop_params", getParamsOnCanDrop, setParamsOnCanDrop);
REFLECT_LUA_METHOD("getDraggedSheet", luaGetDraggedSheet)
REFLECT_LUA_METHOD("getHpBuff", luaGetHpBuff)
REFLECT_LUA_METHOD("getSapBuff", luaGetSapBuff)
REFLECT_LUA_METHOD("getFocusBuff", luaGetFocusBuff)
REFLECT_LUA_METHOD("getStaBuff", luaGetStaBuff)
REFLECT_LUA_METHOD("getChaScore1Buff", luaGetChaScore1Buff)
REFLECT_LUA_METHOD("getChaScore3Buff", luaGetChaScore3Buff)
REFLECT_LUA_METHOD("getChaScore4Buff", luaGetChaScore4Buff)
REFLECT_LUA_METHOD("getChaScore2Buff", luaGetChaScore2Buff)
REFLECT_LUA_METHOD("getName", luaGetName)
REFLECT_LUA_METHOD("getCreatorName", luaGetCreatorName)
REFLECT_LUA_METHOD("waitInfo", luaWaitInfo)
@ -291,10 +291,10 @@ public:
REFLECT_EXPORT_END
int luaGetDraggedSheet(CLuaState &ls);
int luaGetHpBuff(CLuaState &ls);
int luaGetSapBuff(CLuaState &ls);
int luaGetFocusBuff(CLuaState &ls);
int luaGetStaBuff(CLuaState &ls);
int luaGetChaScore1Buff(CLuaState &ls);
int luaGetChaScore3Buff(CLuaState &ls);
int luaGetChaScore4Buff(CLuaState &ls);
int luaGetChaScore2Buff(CLuaState &ls);
int luaGetName(CLuaState &ls);
int luaGetCreatorName(CLuaState &ls);
int luaWaitInfo(CLuaState &ls);

View file

@ -59,10 +59,10 @@ public:
inline NLMISC::CCDBNodeLeaf *getTitle() { return _Title ? (&*_Title) : &*(_Title = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "TITLE")); }
inline NLMISC::CCDBNodeLeaf *getRPTags() { return _RPTags ? (&*_RPTags) : &*(_RPTags = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "RPTAGS")); }
inline NLMISC::CCDBNodeLeaf *getGuildName() { return _GuildName ? (&*_GuildName) : &*(_GuildName = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "GUILD_NAME")); }
inline NLMISC::CCDBNodeLeaf *getHP() { return _HP ? (&*_HP) : &*(_HP = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "HP")); }
inline NLMISC::CCDBNodeLeaf *getSta() { return _Sta ? (&*_Sta) : &*(_Sta = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "STA")); }
inline NLMISC::CCDBNodeLeaf *getSap() { return _Sap ? (&*_Sap) : &*(_Sap = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "SAP")); }
inline NLMISC::CCDBNodeLeaf *getFocus() { return _Focus ? (&*_Focus) : &*(_Focus = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "FOCUS")); }
inline NLMISC::CCDBNodeLeaf *getChaScore1() { return _ChaScore1 ? (&*_ChaScore1) : &*(_ChaScore1 = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "ChaScore1")); }
inline NLMISC::CCDBNodeLeaf *getChaScore2() { return _ChaScore2 ? (&*_ChaScore2) : &*(_ChaScore2 = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "ChaScore2")); }
inline NLMISC::CCDBNodeLeaf *getChaScore3() { return _ChaScore3 ? (&*_ChaScore3) : &*(_ChaScore3 = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "ChaScore3")); }
inline NLMISC::CCDBNodeLeaf *getChaScore4() { return _ChaScore4 ? (&*_ChaScore4) : &*(_ChaScore4 = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "ChaScore4")); }
inline NLMISC::CCDBNodeLeaf *getAction() { return _Action ? (&*_Action) : &*(_Action = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "ACTION")); }
inline NLMISC::CCDBNodeLeaf *getMessages() { return _Messages ? (&*_Messages) : &*(_Messages = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "MESSAGES")); }
inline NLMISC::CCDBNodeLeaf *getPvPLogo() { return _PvPLogo ? (&*_PvPLogo) : &*(_PvPLogo = NLGUI::CDBManager::getInstance()->getDbProp(_DBPrefix + "PVP_LOGO")); }
@ -77,10 +77,10 @@ private:
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _Title;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _RPTags;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _GuildName;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _HP;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _Sta;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _Sap;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _Focus;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _ChaScore1;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _ChaScore2;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _ChaScore3;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _ChaScore4;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _Action;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _Messages;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _PvPLogo;
@ -150,7 +150,7 @@ CRGBA CGroupInSceneUserInfo::BarColor[NumBars]=
CRGBA(255, 255, 255),
};
CRGBA CGroupInSceneUserInfo::BarColorHPNegative = CRGBA(127, 32, 0);
CRGBA CGroupInSceneUserInfo::BarColorChaScore1Negative = CRGBA(127, 32, 0);
// ***************************************************************************
@ -227,7 +227,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
forageSourceBarDisplayed = (entity->slot() == UserEntity->selection());
bars[Time] = forageSourceBarDisplayed;
bars[Amount] = forageSourceBarDisplayed;
//bool displayExtractingParams = true; //forageSource->isExtractionInProgress() /*&& NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"HP")*/;
//bool displayExtractingParams = true; //forageSource->isExtractionInProgress() /*&& NLGUI::CDBManager::getInstance()->getDbProp(dbEntry+"ChaScore1")*/;
bars[Life] = forageSourceBarDisplayed;//displayExtractingParams;
bars[Danger] = forageSourceBarDisplayed;//displayExtractingParams;
bars[Spawn] = forageSourceBarDisplayed;//displayExtractingParams;
@ -862,18 +862,18 @@ void CGroupInSceneUserInfo::getBarSettings( CInterfaceManager* pIM, bool isUser,
// if currently is edition mode, then bars are not displayed
if (ClientCfg.R2EDEnabled && R2::isEditionCurrent())
{
bars[HP] = false;
bars[SAP] = false;
bars[STA] = false;
bars[Focus] = false;
bars[ChaScore1] = false;
bars[ChaScore3] = false;
bars[ChaScore2] = false;
bars[ChaScore4] = false;
bars[Action] = false;
}
else
{
bars[HP] = _ConfigSaveInsceneDB[dbEntry].getHP()->getValueBool();
bars[SAP] = (isUser || isFriend) && (isUser || isPlayer) && _ConfigSaveInsceneDB[dbEntry].getSap()->getValueBool();
bars[STA] = (isUser || isFriend) && (isUser || isPlayer) && _ConfigSaveInsceneDB[dbEntry].getSta()->getValueBool();
bars[Focus] = (isUser || isFriend) && (isUser || isPlayer) && _ConfigSaveInsceneDB[dbEntry].getFocus()->getValueBool();
bars[ChaScore1] = _ConfigSaveInsceneDB[dbEntry].getChaScore1()->getValueBool();
bars[ChaScore3] = (isUser || isFriend) && (isUser || isPlayer) && _ConfigSaveInsceneDB[dbEntry].getChaScore3()->getValueBool();
bars[ChaScore2] = (isUser || isFriend) && (isUser || isPlayer) && _ConfigSaveInsceneDB[dbEntry].getChaScore2()->getValueBool();
bars[ChaScore4] = (isUser || isFriend) && (isUser || isPlayer) && _ConfigSaveInsceneDB[dbEntry].getChaScore4()->getValueBool();
bars[Action] = (isUser) && _ConfigSaveInsceneDB[dbEntry].getAction()->getValueBool();
}
}
@ -1059,28 +1059,28 @@ void CGroupInSceneUserInfo::updateDynamicData ()
// NB: forage don't use CBarManager for 2 reasons: useless (forage bars exist only through VP),
// and complicated since updated at each frame on client (because of smooth transition code)
CForageSourceCL *forageSource = static_cast<CForageSourceCL*>(_Entity);
barInfo.Score[SCORES::hit_points]= forageSource->getTimeBar(); // Map TimeBar to HP
barInfo.Score[SCORES::sap]= forageSource->getQuantityBar(); // Map QuantityBar to SAP
barInfo.Score[SCORES::stamina]= forageSource->getDBar(); // Map D Bar to Sta
barInfo.Score[SCORES::focus]= forageSource->getEBar(); // Map E Bar to Focus
barInfo.Score[SCORES::cha_score1]= forageSource->getTimeBar(); // Map TimeBar to ChaScore1
barInfo.Score[SCORES::cha_score3]= forageSource->getQuantityBar(); // Map QuantityBar to ChaScore3
barInfo.Score[SCORES::cha_score2]= forageSource->getDBar(); // Map D Bar to ChaScore2
barInfo.Score[SCORES::cha_score4]= forageSource->getEBar(); // Map E Bar to ChaScore4
}
// Set the bar
if (_Bars[HP])
if (_Bars[ChaScore1])
{
sint value = (sint)_BatLength * barInfo.Score[SCORES::hit_points] / RZ_BARS_LENGTH;
sint value = (sint)_BatLength * barInfo.Score[SCORES::cha_score1] / RZ_BARS_LENGTH;
if ( ! _Entity->isForageSource() )
{
if (value < 0)
{
value = -value;
_Bars[HP]->setColorRGBA(BarColorHPNegative);
_Bars[ChaScore1]->setColorRGBA(BarColorChaScore1Negative);
}
else
{
_Bars[HP]->setColorRGBA(BarColor[HP]);
_Bars[ChaScore1]->setColorRGBA(BarColor[ChaScore1]);
}
// if dead creature, force the hp to 0
// if dead creature, force the ChaScore1 to 0
if( _Entity->mode() == MBEHAV::DEATH && !_Entity->isPlayer() && !_Entity->isUser())
{
if( value > 0 )
@ -1095,22 +1095,22 @@ void CGroupInSceneUserInfo::updateDynamicData ()
CForageSourceCL *forageSource = static_cast<CForageSourceCL*>(_Entity);
if ( forageSource->isInExtraTime() )
{
_Bars[HP]->setColorRGBA(
_Bars[ChaScore1]->setColorRGBA(
forageSource->isInProspectionExtraTime() ?
CRGBA( 255, 0, 0 ) : // red
CRGBA( 235, 144, 0 ) ); // orange
}
}
clamp (value, 0, (sint)_BatLength);
if(_Bars[HP]->getW() != value)
_Bars[HP]->setWAndInvalidateCoords (value);
if(_Bars[ChaScore1]->getW() != value)
_Bars[ChaScore1]->setWAndInvalidateCoords (value);
}
if (_Bars[SAP])
if (_Bars[ChaScore3])
{
int value = _BatLength * barInfo.Score[SCORES::sap] / RZ_BARS_LENGTH;
int value = _BatLength * barInfo.Score[SCORES::cha_score3] / RZ_BARS_LENGTH;
clamp (value, 0, (int)_BatLength);
if(_Bars[SAP]->getW() != value)
_Bars[SAP]->setWAndInvalidateCoords (value);
if(_Bars[ChaScore3]->getW() != value)
_Bars[ChaScore3]->setWAndInvalidateCoords (value);
// Forage source quantity bar: update contents value in tooltip
if ( _Entity->isForageSource() )
@ -1126,27 +1126,27 @@ void CGroupInSceneUserInfo::updateDynamicData ()
toolTip2->setDefaultContextHelp( txt );
}
}
if (_Bars[STA])
if (_Bars[ChaScore2])
{
int value = _BatLength * barInfo.Score[SCORES::stamina] / RZ_BARS_LENGTH;
int value = _BatLength * barInfo.Score[SCORES::cha_score2] / RZ_BARS_LENGTH;
clamp (value, 0, (int)_BatLength);
if(_Bars[STA]->getW() != value)
if(_Bars[ChaScore2]->getW() != value)
{
// Forage source life bar: update danger colour
if ( _Entity->isForageSource() )
{
CRGBA color = _Bars[STA]->getColorRGBA();
color.blendFromuiRGBOnly( CRGBA( 255, 127, 127 ), CRGBA( 255, 0, 0 ), (RZ_BARS_LENGTH - barInfo.Score[SCORES::stamina]) * (256/RZ_BARS_LENGTH) );
_Bars[STA]->setColorRGBA( color );
CRGBA color = _Bars[ChaScore2]->getColorRGBA();
color.blendFromuiRGBOnly( CRGBA( 255, 127, 127 ), CRGBA( 255, 0, 0 ), (RZ_BARS_LENGTH - barInfo.Score[SCORES::cha_score2]) * (256/RZ_BARS_LENGTH) );
_Bars[ChaScore2]->setColorRGBA( color );
}
_Bars[STA]->setWAndInvalidateCoords (value);
_Bars[ChaScore2]->setWAndInvalidateCoords (value);
}
}
if (_Bars[Focus])
if (_Bars[ChaScore4])
{
int value = _BatLength * barInfo.Score[SCORES::focus] / RZ_BARS_LENGTH;
int value = _BatLength * barInfo.Score[SCORES::cha_score4] / RZ_BARS_LENGTH;
clamp (value, 0, (int)_BatLength);
if(_Bars[Focus]->getW() != value)
if(_Bars[ChaScore4]->getW() != value)
{
// Forage source life bar: update danger colour
if ( _Entity->isForageSource() )
@ -1154,16 +1154,16 @@ void CGroupInSceneUserInfo::updateDynamicData ()
CForageSourceCL *forageSource = static_cast<CForageSourceCL*>(_Entity);
if ( forageSource->isSafe() )
{
_Bars[Focus]->setColorRGBA( CForageSourceCL::SafeSourceColor );
_Bars[ChaScore4]->setColorRGBA( CForageSourceCL::SafeSourceColor );
}
else
{
CRGBA color = _Bars[Focus]->getColorRGBA();
color.blendFromuiRGBOnly( CRGBA( 255, 175, 0 ), CRGBA( 255, 0, 0 ), (RZ_BARS_LENGTH - barInfo.Score[SCORES::focus]) * (256/RZ_BARS_LENGTH) );
_Bars[Focus]->setColorRGBA( color );
CRGBA color = _Bars[ChaScore4]->getColorRGBA();
color.blendFromuiRGBOnly( CRGBA( 255, 175, 0 ), CRGBA( 255, 0, 0 ), (RZ_BARS_LENGTH - barInfo.Score[SCORES::cha_score4]) * (256/RZ_BARS_LENGTH) );
_Bars[ChaScore4]->setColorRGBA( color );
}
}
_Bars[Focus]->setWAndInvalidateCoords (value);
_Bars[ChaScore4]->setWAndInvalidateCoords (value);
}
}

View file

@ -63,10 +63,10 @@ protected:
enum TBar
{
// Living entity Forage source
HP = 0, Time = HP, // If making changes to this enum, please update
SAP, Amount = SAP, // CForageSourceCL::updateVisualPropertyBars() and
STA, Life = STA, // updateVisiblePostPos() because the HP/SAP/STA
Focus, Danger = Focus, // properties are *not* in an array in CEntityCL.
ChaScore1 = 0, Time = ChaScore1, // If making changes to this enum, please update
ChaScore3, Amount = ChaScore3, // CForageSourceCL::updateVisualPropertyBars() and
ChaScore2, Life = ChaScore2, // updateVisiblePostPos() because the ChaScore1/ChaScore3/ChaScore2
ChaScore4, Danger = ChaScore4, // properties are *not* in an array in CEntityCL.
Action, Spawn = Action,
NumBars
};
@ -90,7 +90,7 @@ protected:
class CViewBitmap *_MissionTarget;
static uint _BatLength;
static NLMISC::CRGBA BarColor[NumBars];
static NLMISC::CRGBA BarColorHPNegative;
static NLMISC::CRGBA BarColorChaScore1Negative;
// Node user leaf
static NLMISC::CCDBNodeLeaf *_Value;

View file

@ -1004,7 +1004,7 @@ void CInterfaceManager::initInGame()
// Init FlyingText manager
FlyingTextManager.initInGame();
// Init Bar Manager (HP, SAP etc... Bars)
// Init Bar Manager (ChaScore1, ChaScore2 etc... Bars)
CBarManager::getInstance()->initInGame();
// Init interface props linked to client time
@ -1275,7 +1275,7 @@ void CInterfaceManager::uninitInGame0 ()
void CInterfaceManager::uninitInGame1 ()
{
// release Bar Manager (HP, SAP etc... Bars)
// release Bar Manager (ChaScore1, ChaScore2 etc... Bars)
CBarManager::getInstance()->releaseInGame();
// release FlyingTextManager
@ -1833,8 +1833,7 @@ bool CInterfaceManager::saveConfig (const string &filename)
COFile f;
// using temporary file, so no f.close() unless its a success
if (!f.open(filename, false, false, true)) return false;
if (!f.open(filename)) return false;
CInterfaceConfig ic;
@ -1881,6 +1880,7 @@ bool CInterfaceManager::saveConfig (const string &filename)
{
nlwarning("Config saving failed");
// couldn't save result so do not continue
f.close();
return false;
}
@ -1936,14 +1936,14 @@ bool CInterfaceManager::saveConfig (const string &filename)
nlwarning("Bad user dyn chat saving");
return false;
}
f.close();
}
catch(const NLMISC::EStream &)
{
f.close();
nlwarning("Config saving failed.");
return false;
}
f.close();
ContinentMngr.serialFOWMaps();
@ -2652,8 +2652,7 @@ bool CInterfaceManager::saveKeys(const std::string &filename)
try
{
COFile file;
// using temporary file, so no file.close() unless its a success
if (file.open (filename, false, false, true))
if (file.open (filename))
{
COXml xmlStream;
xmlStream.init (&file);
@ -2683,7 +2682,8 @@ bool CInterfaceManager::saveKeys(const std::string &filename)
}
catch (const Exception &e)
{
nlwarning ("Error while writing the file %s : %s.", filename.c_str(), e.what ());
nlwarning ("Error while writing the file %s : %s. Remove it.", filename.c_str(), e.what ());
CFile::deleteFile(filename);
}
return ret;
}
@ -2711,7 +2711,7 @@ void CInterfaceManager::log(const ucstring &str, const std::string &cat)
{
// Open file with the name of the player
const string fileName= "save/log_" + PlayerSelectedFileName + ".txt";
FILE *f = nlfopen(fileName, "at");
FILE *f = fopen(fileName.c_str(), "at");
if (f != NULL)
{
const string finalString = string(NLMISC::IDisplayer::dateToHumanString()) + " (" + NLMISC::toUpper(cat) + ") * " + str.toUtf8();

View file

@ -87,7 +87,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
effects += "\n";
}
if ( name == "SP_LIFE_AURA" )
if ( name == "SP_ChaScore1_AURA" )
{
uint16 regenMod;
@ -101,7 +101,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
uint32 userDisableTime;
fromString(params[4].c_str(), userDisableTime);
ucstring result = CI18N::get("uiItemConsumableEffectLifeAura");
ucstring result = CI18N::get("uiItemConsumableEffectChaScore1Aura");
strFindReplace(result, "%modifier", toString(regenMod));
strFindReplace(result, "%minutes", toString(duration/60));
strFindReplace(result, "%secondes", toString(duration%60));
@ -113,7 +113,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
effects += "\n";
}
if ( name == "SP_LIFE_AURA2" )
if ( name == "SP_ChaScore1_AURA2" )
{
uint16 regenMod;
@ -128,7 +128,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
uint32 userDisableTime;
fromString(params[4].c_str(), userDisableTime);
ucstring result = CI18N::get("uiItemConsumableEffectLifeAura");
ucstring result = CI18N::get("uiItemConsumableEffectChaScore1Aura");
strFindReplace(result, "%modifier", toString(bonus));
strFindReplace(result, "%minutes", toString(duration/60));
strFindReplace(result, "%secondes", toString(duration%60));
@ -140,7 +140,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
effects += "\n";
}
if ( name == "SP_STAMINA_AURA" )
if ( name == "SP_ChaScore2_AURA" )
{
uint16 regenMod;
@ -154,7 +154,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
uint32 userDisableTime;
fromString(params[4].c_str(), userDisableTime);
ucstring result = CI18N::get("uiItemConsumableEffectStaminaAura");
ucstring result = CI18N::get("uiItemConsumableEffectChaScore2Aura");
strFindReplace(result, "%modifier", toString(regenMod));
strFindReplace(result, "%minutes", toString(duration/60));
strFindReplace(result, "%secondes", toString(duration%60));
@ -167,7 +167,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
}
if ( name == "SP_STAMINA_AURA2" )
if ( name == "SP_ChaScore2_AURA2" )
{
uint16 regenMod;
@ -182,7 +182,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
uint32 userDisableTime;
fromString(params[4].c_str(), userDisableTime);
ucstring result = CI18N::get("uiItemConsumableEffectStaminaAura");
ucstring result = CI18N::get("uiItemConsumableEffectChaScore2Aura");
strFindReplace(result, "%modifier", toString(bonus));
strFindReplace(result, "%minutes", toString(duration/60));
strFindReplace(result, "%secondes", toString(duration%60));
@ -194,7 +194,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
effects += "\n";
}
if ( name == "SP_SAP_AURA" )
if ( name == "SP_ChaScore3_AURA" )
{
uint16 regenMod;
@ -208,7 +208,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
uint32 userDisableTime;
fromString(params[4].c_str(), userDisableTime);
ucstring result = CI18N::get("uiItemConsumableEffectSapAura");
ucstring result = CI18N::get("uiItemConsumableEffectChaScore3Aura");
strFindReplace(result, "%modifier", toString(regenMod));
strFindReplace(result, "%minutes", toString(duration/60));
strFindReplace(result, "%secondes", toString(duration%60));
@ -220,7 +220,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
effects += "\n";
}
if ( name == "SP_SAP_AURA2" )
if ( name == "SP_ChaScore3_AURA2" )
{
uint16 regenMod;
@ -235,7 +235,7 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
uint32 userDisableTime;
fromString(params[4].c_str(), userDisableTime);
ucstring result = CI18N::get("uiItemConsumableEffectSapAura");
ucstring result = CI18N::get("uiItemConsumableEffectChaScore3Aura");
strFindReplace(result, "%modifier", toString(bonus));
strFindReplace(result, "%minutes", toString(duration/60));
strFindReplace(result, "%secondes", toString(duration%60));

View file

@ -422,11 +422,11 @@ void CSBrickManager::compileBrickProperties()
}
// Get usual PropIds
HpPropId= getBrickPropId("hp");
SapPropId= getBrickPropId("sap");
StaPropId= getBrickPropId("sta");
StaWeightFactorId = getBrickPropId("sta_weight_factor");
FocusPropId= getBrickPropId("focus");
ChaScore1PropId= getBrickPropId("ChaScore1");
ChaScore3PropId= getBrickPropId("ChaScore3");
ChaScore2PropId= getBrickPropId("ChaScore2");
ChaScore2WeightFactorId = getBrickPropId("ChaScore2_weight_factor");
ChaScore4PropId= getBrickPropId("ChaScore4");
CastTimePropId= getBrickPropId("ma_casting_time");
RangePropId= getBrickPropId("ma_range");

View file

@ -128,11 +128,11 @@ public:
// get a prop Id from its name.
uint getBrickPropId(const std::string &name);
// Important Ids for properties (to compute cost, range etc...).
uint HpPropId;
uint SapPropId;
uint StaPropId;
uint StaWeightFactorId;
uint FocusPropId;
uint ChaScore1PropId;
uint ChaScore3PropId;
uint ChaScore2PropId;
uint ChaScore2WeightFactorId;
uint ChaScore4PropId;
uint CastTimePropId;
uint RangePropId;
// @}

View file

@ -1135,19 +1135,19 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
sint success= getPhraseSuccessRate(phrase);
float castTime= 0, castTimeMalus= 0;
sint range= 0, rangeMalus= 0;
sint hpCost= 0, hpCostMalus= 0;
sint ChaScore1Cost= 0, ChaScore1CostMalus= 0;
sint enCost= 0, enCostMalus= 0;
getPhraseCastTime(phrase, totalActionMalus, castTime, castTimeMalus);
getPhraseMagicRange(phrase, totalActionMalus, range, rangeMalus);
getPhraseHpCost(phrase, totalActionMalus, hpCost, hpCostMalus);
getPhraseChaScore1Cost(phrase, totalActionMalus, ChaScore1Cost, ChaScore1CostMalus);
if(rootBrick->isCombat())
getPhraseStaCost(phrase, totalActionMalus, enCost, enCostMalus);
getPhraseChaScore2Cost(phrase, totalActionMalus, enCost, enCostMalus);
else if(rootBrick->isMagic())
getPhraseSapCost(phrase, totalActionMalus, enCost, enCostMalus);
getPhraseChaScore3Cost(phrase, totalActionMalus, enCost, enCostMalus);
else
getPhraseFocusCost(phrase, totalActionMalus, enCost, enCostMalus);
getPhraseChaScore4Cost(phrase, totalActionMalus, enCost, enCostMalus);
sint32 successModifier = 0;
CCDBNodeLeaf * nodeSM = NULL;
@ -1198,7 +1198,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase,
strFindReplace(text, "%success", toString(successStr));
strFindReplace(text, "%duration", formatMalus(castTime, castTimeMalus) );
strFindReplace(text, "%energy_cost", formatMalus(enCost, enCostMalus) );
strFindReplace(text, "%hp_cost", formatMalus(hpCost, hpCostMalus) );
strFindReplace(text, "%ChaScore1_cost", formatMalus(ChaScore1Cost, ChaScore1CostMalus) );
// special range and "self"
if(range==0)
strFindReplace(text, "%range", CI18N::get("uihelpPhraseRangeSelf"));
@ -1461,38 +1461,38 @@ sint CSPhraseManager::getForageExtractionPhraseSuccessRate(const CSPhraseCom
}
// ***************************************************************************
void CSPhraseManager::getPhraseSapCost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus)
void CSPhraseManager::getPhraseChaScore3Cost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus)
{
CSBrickManager *pBM= CSBrickManager::getInstance();
cost= (sint)getPhraseSumBrickProp(phrase, pBM->SapPropId, true);
cost= (sint)getPhraseSumBrickProp(phrase, pBM->ChaScore3PropId, true);
// compute malus (positive)
costMalus= (cost * (totalActionMalus))/100;
}
// ***************************************************************************
void CSPhraseManager::getPhraseStaCost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus)
void CSPhraseManager::getPhraseChaScore2Cost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus)
{
CSBrickManager *pBM= CSBrickManager::getInstance();
cost= (sint)getPhraseSumBrickProp(phrase, pBM->StaPropId, true);
cost= (sint)getPhraseSumBrickProp(phrase, pBM->ChaScore2PropId, true);
// TODO: combat special case
// compute malus (positive)
costMalus= (cost * (totalActionMalus))/100;
}
// ***************************************************************************
void CSPhraseManager::getPhraseFocusCost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus)
void CSPhraseManager::getPhraseChaScore4Cost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus)
{
CSBrickManager *pBM= CSBrickManager::getInstance();
cost= (sint)getPhraseSumBrickProp(phrase, pBM->FocusPropId, true);
cost= (sint)getPhraseSumBrickProp(phrase, pBM->ChaScore4PropId, true);
// compute malus (positive)
costMalus= (cost * (totalActionMalus))/100;
}
// ***************************************************************************
void CSPhraseManager::getPhraseHpCost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus)
void CSPhraseManager::getPhraseChaScore1Cost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus)
{
CSBrickManager *pBM= CSBrickManager::getInstance();
cost= (sint)getPhraseSumBrickProp(phrase, pBM->HpPropId, true);
cost= (sint)getPhraseSumBrickProp(phrase, pBM->ChaScore1PropId, true);
// compute malus (positive)
costMalus= (cost * (totalActionMalus))/100;
}
@ -1656,7 +1656,7 @@ float CSPhraseManager::getPhraseSumBrickProp(const CSPhraseCom &phrase, uint
else
sum+= brick->Properties[j].Value;
}
else if(propId==CSBrickManager::getInstance()->StaPropId && brick->Properties[j].PropId==CSBrickManager::getInstance()->StaWeightFactorId)
else if(propId==CSBrickManager::getInstance()->ChaScore2PropId && brick->Properties[j].PropId==CSBrickManager::getInstance()->ChaScore2WeightFactorId)
{
CInterfaceManager *im = CInterfaceManager::getInstance();
if (!_ServerUserDefaultWeightHandsLeaf) _ServerUserDefaultWeightHandsLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:DEFAULT_WEIGHT_HANDS");
@ -4591,7 +4591,7 @@ int CSPhraseComAdpater::luaGetCastRange(CLuaState &ls)
}
// ***************************************************************************
int CSPhraseComAdpater::luaGetHpCost(CLuaState &ls)
int CSPhraseComAdpater::luaGetChaScore1Cost(CLuaState &ls)
{
if (Phrase.Bricks.empty())
{
@ -4599,15 +4599,15 @@ int CSPhraseComAdpater::luaGetHpCost(CLuaState &ls)
return 1;
}
CSPhraseManager *pPM = CSPhraseManager::getInstance();
sint hpCost;
sint hpCostMalus;
pPM->getPhraseHpCost(this->Phrase, pPM->getTotalActionMalus(Phrase), hpCost, hpCostMalus);
ls.push(hpCost + hpCostMalus);
sint ChaScore1Cost;
sint ChaScore1CostMalus;
pPM->getPhraseChaScore1Cost(this->Phrase, pPM->getTotalActionMalus(Phrase), ChaScore1Cost, ChaScore1CostMalus);
ls.push(ChaScore1Cost + ChaScore1CostMalus);
return 1;
}
// ***************************************************************************
int CSPhraseComAdpater::luaGetSapCost(CLuaState &ls)
int CSPhraseComAdpater::luaGetChaScore3Cost(CLuaState &ls)
{
if (Phrase.Bricks.empty())
{
@ -4615,10 +4615,10 @@ int CSPhraseComAdpater::luaGetSapCost(CLuaState &ls)
return 1;
}
CSPhraseManager *pPM = CSPhraseManager::getInstance();
sint sapCost;
sint sapCostMalus;
pPM->getPhraseSapCost(this->Phrase, pPM->getTotalActionMalus(Phrase), sapCost, sapCostMalus);
ls.push(sapCost + sapCostMalus);
sint ChaScore3Cost;
sint ChaScore3CostMalus;
pPM->getPhraseChaScore3Cost(this->Phrase, pPM->getTotalActionMalus(Phrase), ChaScore3Cost, ChaScore3CostMalus);
ls.push(ChaScore3Cost + ChaScore3CostMalus);
return 1;
}
@ -4637,7 +4637,7 @@ int CSPhraseComAdpater::luaGetSuccessRate(CLuaState &ls)
// ***************************************************************************
int CSPhraseComAdpater::luaGetFocusCost(CLuaState &ls)
int CSPhraseComAdpater::luaGetChaScore4Cost(CLuaState &ls)
{
if (Phrase.Bricks.empty())
{
@ -4645,15 +4645,15 @@ int CSPhraseComAdpater::luaGetFocusCost(CLuaState &ls)
return 1;
}
CSPhraseManager *pPM = CSPhraseManager::getInstance();
sint focusCost;
sint focusCostMalus;
pPM->getPhraseFocusCost(this->Phrase, pPM->getTotalActionMalus(Phrase), focusCost, focusCostMalus);
ls.push(focusCost + focusCostMalus);
sint ChaScore4Cost;
sint ChaScore4CostMalus;
pPM->getPhraseChaScore4Cost(this->Phrase, pPM->getTotalActionMalus(Phrase), ChaScore4Cost, ChaScore4CostMalus);
ls.push(ChaScore4Cost + ChaScore4CostMalus);
return 1;
}
// ***************************************************************************
int CSPhraseComAdpater::luaGetStaCost(CLuaState &ls)
int CSPhraseComAdpater::luaGetChaScore2Cost(CLuaState &ls)
{
if (Phrase.Bricks.empty())
{
@ -4661,10 +4661,10 @@ int CSPhraseComAdpater::luaGetStaCost(CLuaState &ls)
return 1;
}
CSPhraseManager *pPM = CSPhraseManager::getInstance();
sint staCost;
sint staCostMalus;
pPM->getPhraseStaCost(this->Phrase, pPM->getTotalActionMalus(Phrase), staCost, staCostMalus);
ls.push(staCost + staCostMalus);
sint ChaScore2Cost;
sint ChaScore2CostMalus;
pPM->getPhraseChaScore2Cost(this->Phrase, pPM->getTotalActionMalus(Phrase), ChaScore2Cost, ChaScore2CostMalus);
ls.push(ChaScore2Cost + ChaScore2CostMalus);
return 1;
}

View file

@ -70,10 +70,10 @@ public:
REFLECT_EXPORT_START(CSPhraseComAdpater, CInterfaceElement)
REFLECT_LUA_METHOD("getCastTime", luaGetCastTime)
REFLECT_LUA_METHOD("getCastRange", luaGetCastRange)
REFLECT_LUA_METHOD("getHpCost", luaGetHpCost)
REFLECT_LUA_METHOD("getSapCost", luaGetSapCost)
REFLECT_LUA_METHOD("getFocusCost", luaGetFocusCost)
REFLECT_LUA_METHOD("getStaCost", luaGetStaCost)
REFLECT_LUA_METHOD("getChaScore1Cost", luaGetChaScore1Cost)
REFLECT_LUA_METHOD("getChaScore3Cost", luaGetChaScore3Cost)
REFLECT_LUA_METHOD("getChaScore4Cost", luaGetChaScore4Cost)
REFLECT_LUA_METHOD("getChaScore2Cost", luaGetChaScore2Cost)
REFLECT_LUA_METHOD("getName", luaGetName)
REFLECT_LUA_METHOD("getDesc", luaGetDesc)
REFLECT_LUA_METHOD("getSuccessRate", luaGetSuccessRate)
@ -86,11 +86,11 @@ public:
REFLECT_EXPORT_END
int luaGetCastTime(CLuaState &ls);
int luaGetCastRange(CLuaState &ls);
int luaGetHpCost(CLuaState &ls);
int luaGetSapCost(CLuaState &ls);
int luaGetChaScore1Cost(CLuaState &ls);
int luaGetChaScore3Cost(CLuaState &ls);
int luaGetSuccessRate(CLuaState &ls);
int luaGetFocusCost(CLuaState &ls);
int luaGetStaCost(CLuaState &ls);
int luaGetChaScore4Cost(CLuaState &ls);
int luaGetChaScore2Cost(CLuaState &ls);
int luaGetName(CLuaState &ls);
int luaGetDesc(CLuaState &ls);
int luaIsMagicPhrase(CLuaState &ls);
@ -343,14 +343,14 @@ public:
sint getForageExtractionPhraseSuccessRate(const CSPhraseCom &phrase, SKILLS::ESkills skill);
// return the fmt according to forage terrain specializing
ucstring getForageExtractionPhraseEcotypeFmt(const CSPhraseCom &phrase);
// Get the Phrase Sap Cost
void getPhraseSapCost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus);
// Get the Phrase Sta Cost
void getPhraseStaCost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus);
// Get the Phrase Focus Cost
void getPhraseFocusCost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus);
// Get the Phrase Hp Cost
void getPhraseHpCost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus);
// Get the Phrase ChaScore3 Cost
void getPhraseChaScore3Cost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus);
// Get the Phrase ChaScore2 Cost
void getPhraseChaScore2Cost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus);
// Get the Phrase ChaScore4 Cost
void getPhraseChaScore4Cost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus);
// Get the Phrase ChaScore1 Cost
void getPhraseChaScore1Cost(const CSPhraseCom &phrase, uint32 totalActionMalus, sint &cost, sint &costMalus);
// Get the Phrase Cast Time
void getPhraseCastTime(const CSPhraseCom &phrase, uint32 totalActionMalus, float &castTime, float &castTimeMalus);
// Get the Phrase Range

View file

@ -3168,18 +3168,18 @@ void impulseItemCloseRoomInventory(NLMISC::CBitMemStream &impulse)
void impulseUserBars(NLMISC::CBitMemStream &impulse)
{
uint8 msgNumber;
sint32 hp, sap, sta, focus;
sint32 ChaScore1, ChaScore3, ChaScore2, ChaScore4;
impulse.serial(msgNumber);
impulse.serial(hp);
impulse.serial(sap);
impulse.serial(sta);
impulse.serial(focus);
impulse.serial(ChaScore1);
impulse.serial(ChaScore3);
impulse.serial(ChaScore2);
impulse.serial(ChaScore4);
if (PermanentlyBanned) return;
// Setup the user Bars
CBarManager::CBarInfo bi;
CBarManager::getInstance()->setupUserBarInfo(msgNumber, hp, sap, sta, focus);
CBarManager::getInstance()->setupUserBarInfo(msgNumber, ChaScore1, ChaScore3, ChaScore2, ChaScore4);
}
//-----------------------------------------------
@ -3437,19 +3437,19 @@ void impulseUserPopup(NLMISC::CBitMemStream &impulse)
//-----------------------------------------------
//-----------------------------------------------
//extern void impulseCombatFlyingHpDelta(NLMISC::CBitMemStream &impulse);
void impulseCombatFlyingHpDelta(NLMISC::CBitMemStream &impulse)
//extern void impulseCombatFlyingChaScore1Delta(NLMISC::CBitMemStream &impulse);
void impulseCombatFlyingChaScore1Delta(NLMISC::CBitMemStream &impulse)
{
uint32 entityID;
uint32 rgba;
sint16 hpDelta;
sint16 ChaScore1Delta;
impulse.serial(entityID);
impulse.serial(rgba);
impulse.serial(hpDelta);
impulse.serial(ChaScore1Delta);
CRGBA color((uint8)(rgba>>24&255), (uint8)(rgba>>16&255), (uint8)(rgba>>8&255), (uint8)(rgba&255));
CEntityCL *entity = EntitiesMngr.getEntityByCompressedIndex(entityID);
if (entity)
entity->addHPOutput(ucstring(toString("%d", hpDelta)), color);
entity->addChaScore1Output(ucstring(toString("%d", ChaScore1Delta)), color);
}
void impulseCombatFlyingTextItemSpecialEffectProc(NLMISC::CBitMemStream &impulse)
@ -3467,7 +3467,7 @@ void impulseCombatFlyingTextItemSpecialEffectProc(NLMISC::CBitMemStream &impulse
strFindReplace(text, "%param", toString("%d", param));
CEntityCL *entity = EntitiesMngr.getEntityByCompressedIndex(entityID);
if (entity)
entity->addHPOutput(text, color);
entity->addChaScore1Output(text, color);
}
void impulseCombatFlyingText(NLMISC::CBitMemStream &impulse)
@ -3532,7 +3532,7 @@ void impulseCombatFlyingText(NLMISC::CBitMemStream &impulse)
CEntityCL *entity = EntitiesMngr.getEntityByCompressedIndex(entityID);
if (entity)
entity->addHPOutput(text, color, dt);
entity->addChaScore1Output(text, color, dt);
}
void impulseSetSeason(NLMISC::CBitMemStream &impulse)
@ -3716,7 +3716,7 @@ void initializeNetwork()
GenericMsgHeaderMngr.setCallback( "OUTPOST:CHOOSE_SIDE", impulseOutpostChooseSide );
GenericMsgHeaderMngr.setCallback( "OUTPOST:DECLARE_WAR_ACK", impulseOutpostDeclareWarAck );
GenericMsgHeaderMngr.setCallback( "COMBAT:FLYING_HP_DELTA", impulseCombatFlyingHpDelta );
GenericMsgHeaderMngr.setCallback( "COMBAT:FLYING_ChaScore1_DELTA", impulseCombatFlyingChaScore1Delta );
GenericMsgHeaderMngr.setCallback( "COMBAT:FLYING_TEXT_ISE", impulseCombatFlyingTextItemSpecialEffectProc );
GenericMsgHeaderMngr.setCallback( "COMBAT:FLYING_TEXT", impulseCombatFlyingText );

View file

@ -264,7 +264,7 @@ Tbe bitfield returned let us know if the selected target is a botobject, if it i
- r2:updateAnimBarActions: called by CDynamicMapClient::onNpcAnimationTargeted, update the anim bar that contains action that can be done on the selecte npc
The DM can push button on the anim bar to do some DM functions like kill an npc, kill a group, despawn, heal, control, speak as
- dssTarget with a parameter DESPAWN_NPC, ADD_HP, KILL_NPC, ADD_HP, GRP_KILL, GRP_HEAL, CONTROL, STOP_CONTROL, TALK_AS, STOP_TALK let the dm do dm functions.
- dssTarget with a parameter DESPAWN_NPC, ADD_ChaScore1, KILL_NPC, ADD_ChaScore1, GRP_KILL, GRP_HEAL, CONTROL, STOP_CONTROL, TALK_AS, STOP_TALK let the dm do dm functions.
CONTROL / STOP_CONTROL
The DM can incarnate a npc: in this case he is tp at the npc position, he takes the speed of the npc.
@ -294,10 +294,10 @@ Each Sentence that the npc would say is written in this dynamic channel.
- CServerAnimationModule handle the management of list (CServerAnimationModule::setTalkingAsPlayer)
- Ais handle the notification of the death of bot (useful for updating the list of controlled bot) (see CAisWrapper::askBotDespawnNotification)
ADD_HP / KILL_NPC / ADD_HP / GRP_KILL / GRP_HEAL
It is possible for the Dm to add/remove hp to a group/npc.
- dssTarget with ADD_HP ok KILL_NPC or GRP_KILL or GRP_HEAL as parameter: heal/kill a npc/group
Note: CServerAnimationModule will call CAiWrapper::setGrpHPLevel, CAiWrapper::setHPLevel that will call Ais native function (nf_npc_grp.cpp)
ADD_ChaScore1 / KILL_NPC / ADD_ChaScore1 / GRP_KILL / GRP_HEAL
It is possible for the Dm to add/remove ChaScore1 to a group/npc.
- dssTarget with ADD_ChaScore1 ok KILL_NPC or GRP_KILL or GRP_HEAL as parameter: heal/kill a npc/group
Note: CServerAnimationModule will call CAiWrapper::setGrpChaScore1Level, CAiWrapper::setChaScore1Level that will call Ais native function (nf_npc_grp.cpp)
Theses native functions set the life of a npc.
Its simple to add other AIS native function the same way.
@ -741,9 +741,9 @@ public:
/*! Updates the DM admin bar. Send DM commands.
Called withou param this function update the DM action bar.
Called with as parameter DESPAWN_NPC, ADD_HP, KILL_NPC, ADD_HP, GRP_KILL, GRP_HEAL, CONTROL, STOP_CONTROL, TALK_AS, STOP_TALK it launch DM function
Called with as parameter DESPAWN_NPC, ADD_ChaScore1, KILL_NPC, ADD_ChaScore1, GRP_KILL, GRP_HEAL, CONTROL, STOP_CONTROL, TALK_AS, STOP_TALK it launch DM function
\see CClientEditionModule for more info
\parm args a list of optional argument may be empty or one of "DESPAWN_NPC" "ADD_HP" "KILL_NPC" "ADD_HP" "GRP_KILL" "GRP_HEAL" "CONTROL" "STOP_CONTROL" "TALK_AS" "STOP_TALK". Multi param could be useful for setting the aggro distance (NIY).
\parm args a list of optional argument may be empty or one of "DESPAWN_NPC" "ADD_ChaScore1" "KILL_NPC" "ADD_ChaScore1" "GRP_KILL" "GRP_HEAL" "CONTROL" "STOP_CONTROL" "TALK_AS" "STOP_TALK". Multi param could be useful for setting the aggro distance (NIY).
*/
void dssTarget( std::vector<std::string>& args);

View file

@ -814,7 +814,7 @@ void CDynamicMapClient::onNpcAnimationTargeted(uint32 mode)
{
lua.push("r2ed_anim_kill");
if (mode & CAnimationProp::Grouped) { lua.push("r2ed_anim_grp_kill"); }
lua.push("r2ed_anim_add_hp");
lua.push("r2ed_anim_add_ChaScore1");
if (mode & CAnimationProp::Grouped) { lua.push("r2ed_anim_grp_heal"); }
}

View file

@ -2187,8 +2187,8 @@ void CUserEntity::applyBehaviour(const CBehaviourContext &behaviourContext) // v
{
startItemAttackFXs(_CurrentBehaviour.Combat.ImpactIntensity != 0 && _CurrentBehaviour.Combat.HitType != HITTYPE::Failed, _CurrentBehaviour.Combat.ImpactIntensity);
}
// DeltaHP
applyBehaviourFlyingHPs(behaviourContext, behaviour, targetHitDates);
// DeltaChaScore1
applyBehaviourFlyingChaScore1s(behaviourContext, behaviour, targetHitDates);
}
// In third person view (or camera mode), play the same way than for the others.
else

View file

@ -74,7 +74,7 @@ BS_INVALID 1
BS_INVALID_TARGET 4
BS_ITEM_INCOMPATIBLE 1
BS_ITEM_INCOMPATIBLE_FOR_2_HANDS 1
BS_LACK_STAMINA 1
BS_LACK_ChaScore2 1
BS_MAGIC_SHIELD_DEAD 1
BS_MAGIC_SHIELD_I 1
BS_MISSES_EE 1
@ -113,7 +113,7 @@ BS_SENTENCE_MAGIC_FAILED_S 1
BS_SUFFER_BENEFICIAL_SPELL_E 1
BS_SUFFER_NEUTRAL_SPELL_E 1
BS_SUFFER_OFFENSIVE_SPELL_E 1
BS_SUFFER_PENALTY_NO_STAMINA 1
BS_SUFFER_PENALTY_NO_ChaScore2 1
BS_TARGET_HIGHER_LEVEL 1
BS_TARGET_NOT_ATTACKABLE 1
BS_TARGET_PROTECTED 1
@ -205,54 +205,54 @@ EGS_CANNOT_USE_ACTION_ON_MEKTOUB 1
EGS_CANNOT_USE_NULL_SKILL_S 1
EGS_CANT_BUY_ANOTHER_PACKER 1
EGS_CANT_SELL_ANYTHING 1
EGS_CH_HIGH_REGEN_LIFE_E 1
EGS_CH_HIGH_REGEN_SAP_E 1
EGS_CH_HIGH_REGEN_STAMINA_E 1
EGS_CH_HIGH_U_REGEN_LIFE_E 1
EGS_CH_HIGH_U_REGEN_SAP_E 1
EGS_CH_HIGH_U_REGEN_STAMINA_E 1
EGS_CH_MAJOR_STEAL_HP_E 1
EGS_CH_MAJOR_STEAL_HP_END 1
EGS_CH_MAJOR_STEAL_SAP_E 1
EGS_CH_MAJOR_STEAL_SAP_END 1
EGS_CH_MAJOR_STEAL_STAMINA_E 1
EGS_CH_MAJOR_STEAL_STAMINA_END 1
EGS_CH_MAJOR_U_STEAL_HP_E 1
EGS_CH_MAJOR_U_STEAL_SAP_E 1
EGS_CH_MAJOR_U_STEAL_STAMINA_E 1
EGS_CH_MINOR_ALCHEMY_HP_EI 1
EGS_CH_MINOR_ALCHEMY_SAP_EI 1
EGS_CH_MINOR_ALCHEMY_STA_EI 33
EGS_CH_MINOR_LIFE_HEAL_EI 1
EGS_CH_MINOR_LIFE_HEAL_SELF_I 1
EGS_CH_MINOR_REGEN_LIFE_E 1
EGS_CH_MINOR_REGEN_SAP_E 1
EGS_CH_MINOR_REGEN_STAMINA_E 1
EGS_CH_MINOR_SAP_HEAL_EI 1
EGS_CH_MINOR_SAP_HEAL_SELF_I 1
EGS_CH_MINOR_STAMINA_HEAL_EI 1
EGS_CH_MINOR_STAMINA_HEAL_SELF_I 1
EGS_CH_MINOR_STEAL_HP_EI 1
EGS_CH_MINOR_STEAL_SAP_EI 1
EGS_CH_MINOR_STEAL_STAMINA_EI 1
EGS_CH_MINOR_U_ALCHEMY_HP_EI 1
EGS_CH_MINOR_U_ALCHEMY_SAP_EI 1
EGS_CH_MINOR_U_ALCHEMY_STA_EI 33
EGS_CH_MINOR_U_LIFE_HEAL_EI 1
EGS_CH_MINOR_U_REGEN_LIFE_E 1
EGS_CH_MINOR_U_REGEN_SAP_E 1
EGS_CH_MINOR_U_REGEN_STAMINA_E 1
EGS_CH_MINOR_U_SAP_HEAL_EI 1
EGS_CH_MINOR_U_STAMINA_HEAL_EI 1
EGS_CH_MINOR_U_STEAL_HP_EI 1
EGS_CH_MINOR_U_STEAL_SAP_EI 1
EGS_CH_MINOR_U_STEAL_STAMINA_EI 1
EGS_CH_SPECTATORS_MINOR_LIFE_HEAL_EEI 1
EGS_CH_SPECTATORS_MINOR_LIFE_HEAL_SELF_EI 1
EGS_CH_SPECTATORS_MINOR_SAP_HEAL_EEI 1
EGS_CH_SPECTATORS_MINOR_SAP_HEAL_SELF_EI 1
EGS_CH_SPECTATORS_MINOR_STAMINA_HEAL_EEI 1
EGS_CH_SPECTATORS_MINOR_STAMINA_HEAL_SELF_EI 1
EGS_CH_HIGH_REGEN_ChaScore1_E 1
EGS_CH_HIGH_REGEN_ChaScore3_E 1
EGS_CH_HIGH_REGEN_ChaScore2_E 1
EGS_CH_HIGH_U_REGEN_ChaScore1_E 1
EGS_CH_HIGH_U_REGEN_ChaScore3_E 1
EGS_CH_HIGH_U_REGEN_ChaScore2_E 1
EGS_CH_MAJOR_STEAL_ChaScore1_E 1
EGS_CH_MAJOR_STEAL_ChaScore1_END 1
EGS_CH_MAJOR_STEAL_ChaScore3_E 1
EGS_CH_MAJOR_STEAL_ChaScore3_END 1
EGS_CH_MAJOR_STEAL_ChaScore2_E 1
EGS_CH_MAJOR_STEAL_ChaScore2_END 1
EGS_CH_MAJOR_U_STEAL_ChaScore1_E 1
EGS_CH_MAJOR_U_STEAL_ChaScore3_E 1
EGS_CH_MAJOR_U_STEAL_ChaScore2_E 1
EGS_CH_MINOR_ALCHEMY_ChaScore1_EI 1
EGS_CH_MINOR_ALCHEMY_ChaScore3_EI 1
EGS_CH_MINOR_ALCHEMY_ChaScore2_EI 33
EGS_CH_MINOR_ChaScore1_HEAL_EI 1
EGS_CH_MINOR_ChaScore1_HEAL_SELF_I 1
EGS_CH_MINOR_REGEN_ChaScore1_E 1
EGS_CH_MINOR_REGEN_ChaScore3_E 1
EGS_CH_MINOR_REGEN_ChaScore2_E 1
EGS_CH_MINOR_ChaScore3_HEAL_EI 1
EGS_CH_MINOR_ChaScore3_HEAL_SELF_I 1
EGS_CH_MINOR_ChaScore2_HEAL_EI 1
EGS_CH_MINOR_ChaScore2_HEAL_SELF_I 1
EGS_CH_MINOR_STEAL_ChaScore1_EI 1
EGS_CH_MINOR_STEAL_ChaScore3_EI 1
EGS_CH_MINOR_STEAL_ChaScore2_EI 1
EGS_CH_MINOR_U_ALCHEMY_ChaScore1_EI 1
EGS_CH_MINOR_U_ALCHEMY_ChaScore3_EI 1
EGS_CH_MINOR_U_ALCHEMY_ChaScore2_EI 33
EGS_CH_MINOR_U_ChaScore1_HEAL_EI 1
EGS_CH_MINOR_U_REGEN_ChaScore1_E 1
EGS_CH_MINOR_U_REGEN_ChaScore3_E 1
EGS_CH_MINOR_U_REGEN_ChaScore2_E 1
EGS_CH_MINOR_U_ChaScore3_HEAL_EI 1
EGS_CH_MINOR_U_Chascore2_HEAL_EI 1
EGS_CH_MINOR_U_STEAL_ChaScore1_EI 1
EGS_CH_MINOR_U_STEAL_ChaScore3_EI 1
EGS_CH_MINOR_U_STEAL_ChaScore2_EI 1
EGS_CH_SPECTATORS_MINOR_ChaScore1_HEAL_EEI 1
EGS_CH_SPECTATORS_MINOR_ChaScore1_HEAL_SELF_EI 1
EGS_CH_SPECTATORS_MINOR_ChaScore3_HEAL_EEI 1
EGS_CH_SPECTATORS_MINOR_ChaScore3_HEAL_SELF_EI 1
EGS_CH_SPECTATORS_MINOR_ChaScore2_HEAL_EEI 1
EGS_CH_SPECTATORS_MINOR_ChaScore2_HEAL_SELF_EI 1
EGS_COMBAT_CMS_DOWN 1
EGS_COMBAT_HITS_YOU_EIS 1
EGS_COMBAT_HITS_YOU_NULL_ES 1
@ -283,7 +283,7 @@ EGS_EFFECT_FURIOUS_BOOST_END_E 1
EGS_EFFECT_LEAVES_FRENZY_E 1
EGS_EFFECT_LIGHTNING_PARRY_E 1
EGS_EFFECT_LIGHTNING_PARRY_END_E 1
EGS_EFFECT_LOSE_HP_BLEED 1
EGS_EFFECT_LOSE_ChaScore1_BLEED 1
EGS_EFFECT_MAJOR_FURIOUS_BOOST_E 1
EGS_EFFECT_MAJOR_FURIOUS_BOOST_END_E 1
EGS_EFFECT_MAJOR_RAPID_BURST_E 1
@ -304,7 +304,7 @@ EGS_EFFECT_U_FEAR_END 1
EGS_EFFECT_U_FEAR_FRENZY_E 1
EGS_EFFECT_U_FEAR_FRENZY_END 1
EGS_EFFECT_U_LEAVE_FRENZY 1
EGS_EFFECT_U_LOSE_HP_BLEED 1
EGS_EFFECT_U_LOSE_ChaScore1_BLEED 1
EGS_EFFECT_U_RESIST_BLEED_E 1
EGS_EFFECT_U_RESIST_FEAR_E 1
EGS_EFFECT_U_RESIST_FEAR_FRENZY_E 1
@ -390,44 +390,44 @@ EGS_LOOT_BS_I 1
EGS_LOOT_LS_I 1
EGS_LOOT_MS_I 1
EGS_LOOT_VBS_I 1
EGS_LOSE_SAP_EI 1
EGS_LOSE_STA_EI 1
EGS_LOSE_ChaScore3_EI 1
EGS_LOSE_ChaScore2_EI 1
EGS_MAGIC_BAD_TARGET 1
EGS_MAGIC_CASTER_NEW_LINK_E 1
EGS_MAGIC_CASTER_REMOVE_LINK_E 1
EGS_MAGIC_CAST_OFFENSIVE_SPELL_HP_EEI 1
EGS_MAGIC_CAST_OFFENSIVE_SPELL_SAP_EEI 1
EGS_MAGIC_CAST_OFFENSIVE_SPELL_STA_EEI 1
EGS_MAGIC_HEAL_SPELL_HP_EEI 1
EGS_MAGIC_HEAL_SPELL_SAP_EEI 1
EGS_MAGIC_HEAL_SPELL_STA_EEI 1
EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_HP_EI 1
EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_SAP_EI 1
EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_STA_EI 1
EGS_MAGIC_SELF_HEAL_HP_EI 1
EGS_MAGIC_SELF_HEAL_SAP_EI 1
EGS_MAGIC_SELF_HEAL_STA_EI 1
EGS_MAGIC_CAST_OFFENSIVE_SPELL_ChaScore1_EEI 1
EGS_MAGIC_CAST_OFFENSIVE_SPELL_ChaScore3_EEI 1
EGS_MAGIC_CAST_OFFENSIVE_SPELL_ChaScore2_EEI 1
EGS_MAGIC_HEAL_SPELL_ChaScore1_EEI 1
EGS_MAGIC_HEAL_SPELL_ChasCore3_EEI 1
EGS_MAGIC_HEAL_SPELL_ChaScore2_EEI 1
EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_ChaScore1_EI 1
EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_ChaScore3_EI 1
EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_ChaScore2_EI 1
EGS_MAGIC_SELF_HEAL_ChaScore1_EI 1
EGS_MAGIC_SELF_HEAL_ChaScore3_EI 1
EGS_MAGIC_SELF_HEAL_ChaScore2_EI 1
EGS_MAGIC_TARGET_NEW_LINK_E 1
EGS_MAGIC_TARGET_OUT_OF_RANGE 1
EGS_MAGIC_TARGET_REMOVE_LINK_E 1
EGS_MAGIC_U_CAST_HEAL_SPELL_HP_EI 1
EGS_MAGIC_U_CAST_HEAL_SPELL_SAP_EI 1
EGS_MAGIC_U_CAST_HEAL_SPELL_STA_EI 1
EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_HP_EI 1
EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_SAP_EI 1
EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_STA_EI 1
EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_HP_I 1
EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_SAP_I 1
EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_STA_I 1
EGS_MAGIC_U_SELF_HEAL_HP_I 1
EGS_MAGIC_U_SELF_HEAL_SAP_I 1
EGS_MAGIC_U_SELF_HEAL_STA_I 1
EGS_MAGIC_U_SUFFER_HEAL_SPELL_HP_EI 1
EGS_MAGIC_U_SUFFER_HEAL_SPELL_SAP_EI 1
EGS_MAGIC_U_SUFFER_HEAL_SPELL_STA_EI 1
EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_HP_EI 1
EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_SAP_EI 1
EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_STA_EI 1
EGS_MAGIC_U_CAST_HEAL_SPELL_ChaScore1_EI 1
EGS_MAGIC_U_CAST_HEAL_SPELL_ChaScore3_EI 1
EGS_MAGIC_U_CAST_HEAL_SPELL_ChaScore2_EI 1
EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_ChaScore1_EI 1
EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_ChaScore3_EI 1
EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_ChaScore2_EI 1
EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_ChaScore1_I 1
EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_ChaScore3_I 1
EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_ChaScore2_I 1
EGS_MAGIC_U_SELF_HEAL_ChaScore1_I 1
EGS_MAGIC_U_SELF_HEAL_ChaScore3_I 1
EGS_MAGIC_U_SELF_HEAL_ChaScore2_I 1
EGS_MAGIC_U_SUFFER_HEAL_SPELL_ChaScore1_EI 1
EGS_MAGIC_U_SUFFER_HEAL_SPELL_ChaScore3_EI 1
EGS_MAGIC_U_SUFFER_HEAL_SPELL_ChaScore2_EI 1
EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_ChaScore1_EI 1
EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_ChaScore3_EI 1
EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_ChaScore2_EI 1
EGS_MELEE_BESTIAL_RAGE_E 1
EGS_MELEE_BLIND_FURY_E 1
EGS_MELEE_DEFLECT_E 1
@ -584,9 +584,9 @@ EGS_TARGET_HIT_RFOOT_EI 1
EGS_TARGET_HIT_RLEG_EI 1
EGS_TMP_GENERIC_EFFECT_BEGIN 1
EGS_TMP_GENERIC_EFFECT_END 1
EGS_TOO_EXPENSIVE_HP 1
EGS_TOO_EXPENSIVE_SAP 1
EGS_TOO_EXPENSIVE_STAMINA 1
EGS_TOO_EXPENSIVE_ChaScore1 1
EGS_TOO_EXPENSIVE_ChaScore3 1
EGS_TOO_EXPENSIVE_ChaScore2 1
EGS_TRACKING_DIRECTION_ES 1
EGS_TRACKING_END_E 1
EGS_TRACKING_START_E 1
@ -597,12 +597,12 @@ EGS_TRAINING_FAILED_S 1
EGS_TRAINING_HIGH_DIFFICULTY 1
EGS_TRAINING_INVALID_MODE 1
EGS_TRAINING_LOW_QUALITY_TOOL 1
EGS_TRAINING_NOT_ENOUGH_SAP 1
EGS_TRAINING_NOT_ENOUGH_STAMINA 1
EGS_TRAINING_NOT_ENOUGH_ChaScore3 1
EGS_TRAINING_NOT_ENOUGH_ChaScore2 1
EGS_TRAINING_SUCCESS 1
EGS_USE_LAST_AMMO 1
EGS_U_LOSE_SAP_EI 1
EGS_U_LOSE_STA_EI 1
EGS_U_LOSE_ChaScore3_EI 1
EGS_U_LOSE_ChaScore2_EI 1
EGS_YOU_CRITICAL_HIT_E 1
EGS_YOU_EFFECT_ALREADY_PRESENT 1
EGS_YOU_FUMBLE 1
@ -685,11 +685,11 @@ OPS_XP_MISSION_GAINXP_SKILL_S 1
OPS_XP_NORMAL_GAINXP_SKILL_S 1
OPS_XP_NO_GAINXP_SKILL_S 1
OPS_XP_PROGRESS_CHARACTERISTIC_S 1
OPS_XP_PROGRESS_HP 1
OPS_XP_PROGRESS_ChaScore1 1
OPS_XP_PROGRESS_RESIST_S 1
OPS_XP_PROGRESS_SAP 1
OPS_XP_PROGRESS_SKILL_S 70
OPS_XP_PROGRESS_STAMINA 1
OPS_XP_PROGRESS_ChaScore3 1
OPS_XP_PROGRESS_ChaScore2_S 70
OPS_XP_PROGRESS_ChaScore2 1
WOS_HARVEST_ALREADY_IN_PROGRESS 1
WOS_HARVEST_ALREADY_IN_PROGRESS_E 1
WOS_HARVEST_FAILED 5

View file

@ -173,13 +173,13 @@
<!-- NB a UID invalid doesn't mean no target. It may be a Forage source -->
<leaf name="UID"
type="I20" />
<leaf name="HP"
<leaf name="ChaScore1"
type="S8" />
<leaf name="SAP"
<leaf name="ChaScore3"
type="I7" />
<leaf name="STA"
<leaf name="ChaScore2"
type="I7" />
<leaf name="FOCUS"
<leaf name="ChaScore4"
type="I7" />
<leaf name="PLAYER_LEVEL"
type="I8" />
@ -253,11 +253,11 @@
<!-- Entity Unique Identifier -->
<leaf name="NAME"
type="I32" />
<leaf name="HP"
<leaf name="ChaScore1"
type="S8" />
<leaf name="SAP"
<leaf name="ChaScore3"
type="I7" />
<leaf name="STA"
<leaf name="ChaScore2"
type="I7" />
<leaf name="POS"
type="I64" />
@ -1025,21 +1025,21 @@
<leaf name="COUNTER"
type="I4" />
<!-- The cost each second -->
<leaf name="HP_COST"
<leaf name="ChaScore1_COST"
type="I16" />
<leaf name="SAP_COST"
<leaf name="ChaScore3_COST"
type="I16" />
<leaf name="STA_COST"
<leaf name="ChaScore2_COST"
type="I16" />
<!-- Entity name -->
<leaf name="TARGET_NAME"
type="TEXT" />
<!-- Entity State -->
<leaf name="TARGET_HP"
<leaf name="TARGET_ChaScore1"
type="I7" />
<leaf name="TARGET_SAP"
<leaf name="TARGET_ChaScore3"
type="I7" />
<leaf name="TARGET_STA"
<leaf name="TARGET_ChaScore2"
type="I7" />
</branch>
</branch>
@ -1512,6 +1512,8 @@
type="I5" />
<leaf name="DESPAWN"
type="I7" />
<leaf name="NAME"
type="I32" />
</branch>
</branch>
<branch name="DEBUG_INFO"

View file

@ -1101,7 +1101,7 @@
<branch name="USER">
<leaf name="BARS"
format="u8 s16 s16 s16 s16"
description="server update the players Bars (fast message) $msgNumber $hp $sap $sta $focus" />
description="server update the players Bars (fast message) $msgNumber $cha_score1 $cha_score3 $cha_score2 $cha_score4" />
<leaf name="POPUP"
format="u32 u32"
description="server display an important info message on the client (u32 titleDynString u32 textDynString)" />

View file

@ -107,11 +107,11 @@ public:
{
}
virtual void setHPLevel(NLMISC::CEntityId entityId, uint32 alias, float value)
virtual void setChaScore1Level(NLMISC::CEntityId entityId, uint32 alias, float value)
{
}
virtual void setGrpHPLevel(NLMISC::CEntityId entityId, uint32 alias, float value)
virtual void setGrpChaScore1Level(NLMISC::CEntityId entityId, uint32 alias, float value)
{
}
@ -176,8 +176,8 @@ public:
virtual void setAggroRange(NLMISC::CEntityId entityId, float range);
virtual void setHPLevel(NLMISC::CEntityId entityId, uint32 alias, float value);
virtual void setGrpHPLevel(NLMISC::CEntityId entityId, uint32 alias, float value);
virtual void setChaScore1Level(NLMISC::CEntityId entityId, uint32 alias, float value);
virtual void setGrpChaScore1Level(NLMISC::CEntityId entityId, uint32 alias, float value);
virtual void triggerGrpEvent(NLMISC::CEntityId entityId, float eventId);

View file

@ -414,9 +414,9 @@ namespace BRICK_FAMILIES
// training & characteristics
NL_STRING_CONVERSION_TABLE_ENTRY(BTFOC)
NL_STRING_CONVERSION_TABLE_ENTRY(BTHP)
NL_STRING_CONVERSION_TABLE_ENTRY(BTSAP)
NL_STRING_CONVERSION_TABLE_ENTRY(BTSTA)
NL_STRING_CONVERSION_TABLE_ENTRY(BTTRA)
NL_STRING_CONVERSION_TABLE_ENTRY(BTOBL)
NL_STRING_CONVERSION_TABLE_ENTRY(BTPAI)
NL_STRING_CONVERSION_TABLE_ENTRY(BPPC)
NL_STRING_CONVERSION_TABLE_ENTRY(BPPM)

View file

@ -574,9 +574,9 @@ namespace BRICK_FAMILIES
// ********
BeginTraining,
BTFOC = BeginTraining,
BTHP,
BTSAP,
BTSTA,
BTTRA,
BTOBL,
BTPAI,
// special for carac buying
BeginCharacBuy,
@ -632,26 +632,26 @@ namespace BRICK_FAMILIES
BeginFightPowerParameter = BeginPowerParameter,
BSFMA = BeginFightPowerParameter, // taunt power
BSFMB, // shielding power
BSFMC, // stamina aura
BSFMC, // ChaScore2 aura
BSFMD, // protection aura
BSFME, // umbrella aura
BSFMF, // berserk
BSFMG, // war cry
BSFMH, // heal stamina
BSFMH, // heal ChaScore2
BSFMI, // fire wall
BSFMJ, // thorn wall
BSFMK, // water wall
BSFML, // lightning
EndFightPowerParameter = BSFML,
BSXMA, // life aura
BSXMA, // ChaScore1 aura
BSXMB, // invulnerability
BSXMC, // heal Hp
BSXMC, // heal ChaScore1
BSDMA, // speed
// G for general ??
BSGMA, // heal focus
BSGMA, // heal ChaScore4
BSGMB, // enchant weapon
BSGMBA,
BSGMBC,
@ -662,17 +662,17 @@ namespace BRICK_FAMILIES
BSGMBS,
BeginMagicPowerParameter,
BSMMA = BeginMagicPowerParameter, // sap aura
BSMMA = BeginMagicPowerParameter, // ChaScore3 aura
BSMMB, // anti magic shield
BSMMC, // balance hp
BSMMD, // heal sap
BSMMC, // balance ChaScore1
BSMMD, // heal ChaScore3
EndMagicPowerParameter = BSMMD,
// consumable powers
BSCMA, // heal Hp
BSCMB, // heal Sap
BSCMC, // heal Sta
BSCMD, // heal Focus
BSCMA, // heal ChaScore1
BSCMB, // heal ChaScore3
BSCMC, // heal ChaScore2
BSCMD, // heal ChaScore4
EndPowerParameter = BSCMD,
BeginMagicPowerCredit,

View file

@ -53,13 +53,13 @@ namespace BRICK_FLAGS
NL_STRING_CONVERSION_TABLE_ENTRY (Taunt)
NL_STRING_CONVERSION_TABLE_ENTRY (SpeedingUp)
NL_STRING_CONVERSION_TABLE_ENTRY (LifeConcentration)
NL_STRING_CONVERSION_TABLE_ENTRY (StaminaConcentration)
NL_STRING_CONVERSION_TABLE_ENTRY (SapConcentration)
NL_STRING_CONVERSION_TABLE_ENTRY (ConvertStamina)
NL_STRING_CONVERSION_TABLE_ENTRY (ConvertSap)
NL_STRING_CONVERSION_TABLE_ENTRY (ChaScore1Concentration)
NL_STRING_CONVERSION_TABLE_ENTRY (ChaScore2Concentration)
NL_STRING_CONVERSION_TABLE_ENTRY (ChaScore3Concentration)
NL_STRING_CONVERSION_TABLE_ENTRY (ConvertChaScore2)
NL_STRING_CONVERSION_TABLE_ENTRY (ConvertChaScore3)
NL_STRING_CONVERSION_TABLE_ENTRY (Berserk)
NL_STRING_CONVERSION_TABLE_ENTRY (BalanceHp)
NL_STRING_CONVERSION_TABLE_ENTRY (BalanceChaScore1)
NL_STRING_CONVERSION_TABLE_ENTRY (Heal)
NL_STRING_CONVERSION_TABLE_ENTRY (Shielding)
NL_STRING_CONVERSION_TABLE_ENTRY (Invulnerability)
@ -73,10 +73,10 @@ namespace BRICK_FLAGS
NL_STRING_CONVERSION_TABLE_ENTRY (ModRangeSuccess)
NL_STRING_CONVERSION_TABLE_ENTRY (ModMagicSuccess)
NL_STRING_CONVERSION_TABLE_ENTRY (ModForageSuccess)
NL_STRING_CONVERSION_TABLE_ENTRY (HealHpC)
NL_STRING_CONVERSION_TABLE_ENTRY (HealSapC)
NL_STRING_CONVERSION_TABLE_ENTRY (HealStaC)
NL_STRING_CONVERSION_TABLE_ENTRY (HealFocusC)
NL_STRING_CONVERSION_TABLE_ENTRY (HealChaScore1C)
NL_STRING_CONVERSION_TABLE_ENTRY (HealChaScore2C)
NL_STRING_CONVERSION_TABLE_ENTRY (HealChaScore3C)
NL_STRING_CONVERSION_TABLE_ENTRY (HealChaScore4C)
NL_STRING_CONVERSION_TABLE_ENTRY (Aura)

View file

@ -63,13 +63,13 @@ namespace BRICK_FLAGS
Taunt = BeginPowerFlags,
Shielding,
SpeedingUp,
LifeConcentration,
StaminaConcentration,
SapConcentration,
ConvertStamina,
ConvertSap,
ChaScore1Concentration,
ChaScore2Concentration,
ChaScore3Concentration,
ConvertChaScore2,
ConvertChaScore3,
Berserk,
BalanceHp,
BalanceChaScore1,
Heal,
Invulnerability,
EnchantWeapon,
@ -81,11 +81,11 @@ namespace BRICK_FLAGS
ModMagicSuccess,
ModForageSuccess,
// consumable items related powers
HealHpC,
HealSapC,
HealStaC,
HealFocusC,
EndPowerFlags = HealFocusC,
HealChaScore1C,
HealChaScore2C,
HealChaScore3C,
HealChaScore4C,
EndPowerFlags = HealChaScore4C,
NbPowerFlags = EndPowerFlags - 31,

View file

@ -31,14 +31,14 @@ namespace CHARACTERISTICS
// The conversion table
const CStringConversion<TCharacteristics>::CPair stringTable [] =
{
{ "Constitution", constitution }, //HP max
{ "Metabolism", metabolism }, //Hp Regen
{ "Intelligence", intelligence }, //Sap Max
{ "Wisdom", wisdom }, //Sap regen
{ "Strength", strength }, //Stamina Max
{ "WellBalanced", well_balanced }, //Stamina regen
{ "Dexterity", dexterity }, //Focus Max
{ "Will", will }, //Focus regen
{ "Cha1", cha1 }, //Cha1 Max
{ "Cha1Reg", cha1_reg }, //Cha1 Regeneration
{ "Cha3", cha3 }, //Cha3 Max
{ "Cha3Reg", cha3_reg }, //Cha3 Regeneration
{ "Cha2", cha2 }, //Cha2 Max
{ "Cha2Reg", cha2_reg }, //Cha2 Regeneration
{ "Cha4", cha4 }, //Cha4 Max
{ "Cha4Reg", cha4_reg }, //Cha4 Regeneration
{ "Unknown", Unknown },
@ -73,14 +73,14 @@ namespace CHARACTERISTICS
// The code conversion table
const CStringConversion<TCharacteristics>::CPair codeTable [] =
{
{ "c", constitution },
{ "m", metabolism },
{ "i", intelligence },
{ "w", wisdom },
{ "s", strength },
{ "b", well_balanced },
{ "d", dexterity },
{ "l", will },
{ "s1", cha1 },
{ "r1", cha1_reg },
{ "s2", cha2 },
{ "r2", cha2_reg },
{ "s3", cha3 },
{ "r3", cha3_reg },
{ "s4", cha4 },
{ "r4", cha4_reg },
};
CStringConversion<TCharacteristics> codeCharac(codeTable, sizeof(codeTable) / sizeof(codeTable[0]), Unknown );

View file

@ -27,17 +27,17 @@ namespace CHARACTERISTICS
{
enum TCharacteristics
{
constitution = 0, //HP max
metabolism, //Hp Regen
cha1 = 0, //Trauma max
cha1_reg, //Trauma Regeneration
intelligence, //Sap Max
wisdom, //Sap regen
cha3, //Oblivion Max
cha3_reg, //Oblivion Regeneration
strength, //Stamina Max
well_balanced, //Stamina regen
cha2, //Pain Max
cha2_reg, //Pain Regeneration
dexterity, //Focus Max
will, //Focus regen
cha4, //Focus Max
cha4_reg, //Focus regen
NUM_CHARACTERISTICS,
Unknown = NUM_CHARACTERISTICS
@ -46,7 +46,7 @@ namespace CHARACTERISTICS
/**
* get the right characteristic enum from the input string
* \param str the input string
* \return the ECharacteristics associated to this string (unknown if the string cannot be interpreted)
* \return the TCharacteristics associated to this string (unknown if the string cannot be interpreted)
*/
TCharacteristics toCharacteristic( const std::string &str );

View file

@ -96,10 +96,10 @@ namespace EFFECT_FAMILIES
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffCombatSkills )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffDodge )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffStaminaRegen )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffSapRegen )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffHitPointsRegen )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffFocusRegen )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffChaScore2Regen )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffChaScore3Regen )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffChaScore1Regen )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDebuffChaScore4Regen )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDoTRot )
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDoTCold )
@ -110,9 +110,9 @@ namespace EFFECT_FAMILIES
NL_STRING_CONVERSION_TABLE_ENTRY( CombatDoTShock )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerShielding )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerLifeAura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerStaminaAura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerSapAura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerChaScore1Aura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerChaScore2Aura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerChaScore3Aura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerUmbrella )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerProtection )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerAntiMagicShield )
@ -122,9 +122,9 @@ namespace EFFECT_FAMILIES
NL_STRING_CONVERSION_TABLE_ENTRY( PowerWaterWall )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerLightningWall )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootLifeAura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootStaminaAura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootSapAura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootChaScore1Aura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootChaScore2Aura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootChaScore3Aura )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootUmbrella )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootProtection )
NL_STRING_CONVERSION_TABLE_ENTRY( PowerRootAntiMagicShield )
@ -162,14 +162,14 @@ namespace EFFECT_FAMILIES
NL_STRING_CONVERSION_TABLE_ENTRY( ForageLocateDeposit )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemStatsHP )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemStatsSap )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemStatsSta )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemStatsFoc )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemRegenHP )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemRegenSap )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemRegenSta )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemRegenFoc )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemStatsChaScore1 )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemStatsChaScore3 )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemStatsChaScore2 )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemStatsChaScore4 )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemRegenChaScore1 )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemRegenChaScore3 )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemRegenChaScore2 )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemRegenChaScore4 )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemHarvestAgg )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemHarvestQty )
NL_STRING_CONVERSION_TABLE_ENTRY( TotemHarvestZRs )
@ -311,9 +311,9 @@ namespace EFFECT_FAMILIES
{ "debuff_combat_skills.sbrick",CombatDebuffCombatSkills },
{ "shielding.sbrick", PowerShielding },
{ "life_aura.sbrick", PowerLifeAura },
{ "stamina_aura.sbrick", PowerStaminaAura },
{ "sap_aura.sbrick", PowerSapAura },
{ "cha_score1_aura.sbrick", PowerChaScore1Aura },
{ "cha_score2_aura.sbrick", PowerChaScore2Aura },
{ "cha_score3_aura.sbrick", PowerChaScore3Aura },
{ "umbrella_aura.sbrick", PowerUmbrella },
{ "melee_protection_aura.sbrick",PowerProtection },
{ "anti_magic_shield_aura.sbrick",PowerAntiMagicShield },

View file

@ -117,10 +117,10 @@ namespace EFFECT_FAMILIES
CombatDebuffCombatSkills,
CombatDebuffDodge,
CombatDebuffStaminaRegen,
CombatDebuffSapRegen,
CombatDebuffHitPointsRegen,
CombatDebuffFocusRegen,
CombatDebuffChaScore2Regen,
CombatDebuffChaScore3Regen,
CombatDebuffChaScore1Regen,
CombatDebuffChaScore4Regen,
CombatDoTRot,
CombatDoTCold,
@ -134,9 +134,9 @@ namespace EFFECT_FAMILIES
BeginPowerEffects,
PowerShielding = BeginPowerEffects,
PowerLifeAura,
PowerStaminaAura,
PowerSapAura,
PowerChaScore1Aura,
PowerChaScore2Aura,
PowerChaScore3Aura,
PowerUmbrella,
PowerProtection,
PowerAntiMagicShield,
@ -147,9 +147,9 @@ namespace EFFECT_FAMILIES
PowerWaterWall,
PowerLightningWall,
PowerRootLifeAura,
PowerRootStaminaAura,
PowerRootSapAura,
PowerRootChaScore1Aura,
PowerRootChaScore2Aura,
PowerRootChaScore3Aura,
PowerRootUmbrella,
PowerRootProtection,
PowerRootAntiMagicShield,
@ -192,16 +192,16 @@ namespace EFFECT_FAMILIES
BeginTotemEffects,
// stats
TotemStatsHP = BeginTotemEffects,
TotemStatsSap,
TotemStatsSta,
TotemStatsFoc,
TotemStatsChaScore1 = BeginTotemEffects,
TotemStatsChaScore2,
TotemStatsChaScore3,
TotemStatsChaScore4,
// regen
TotemRegenHP,
TotemRegenSap,
TotemRegenSta,
TotemRegenFoc,
TotemRegenChaScore1,
TotemRegenChaScore2,
TotemRegenChaScore3,
TotemRegenChaScore4,
// harvest
TotemHarvestAgg,

View file

@ -41,10 +41,10 @@ CItemInfos::CItemInfos()
MaxSlashingProtection = 0;
MaxBluntProtection = 0;
MaxPiercingProtection = 0;
HpBuff = 0;
SapBuff = 0;
StaBuff = 0;
FocusBuff = 0;
ChaScore1Buff = 0;
ChaScore3Buff = 0;
ChaScore2Buff = 0;
ChaScore4Buff = 0;
WearEquipmentMalus = 0.0f;
RequiredSkill = SKILLS::unknown;
@ -107,10 +107,10 @@ void CItemInfos::serial(NLMISC::IStream & s)
s.serial( LacustreMagicResistance );
s.serial( JungleMagicResistance );
s.serial( PrimaryRootMagicResistance );
s.serial( HpBuff );
s.serial( SapBuff );
s.serial( StaBuff );
s.serial( FocusBuff );
s.serial( ChaScore1Buff );
s.serial( ChaScore3Buff );
s.serial( ChaScore2Buff );
s.serial( ChaScore4Buff );
s.serial( Enchantment );
s.serial( WearEquipmentMalus );

View file

@ -105,10 +105,10 @@ public:
uint32 LacustreMagicResistance;
uint32 JungleMagicResistance;
uint32 PrimaryRootMagicResistance;
sint32 HpBuff; // hp buff / debuff gived when item is equipped
sint32 SapBuff; // sap buff / debuff gived when item is equipped
sint32 StaBuff; // sta buff / debuff gived when item is equipped
sint32 FocusBuff; // focus buff / debuff gived when item is equipped
sint32 ChaScore1Buff; // ChaScore1 buff / debuff gived when item is equipped
sint32 ChaScore2Buff; // ChaScore2 buff / debuff gived when item is equipped
sint32 ChaScore3Buff; // ChaScore3 buff / debuff gived when item is equipped
sint32 ChaScore4Buff; // ChaScore4 buff / debuff gived when item is equipped
SKILLS::ESkills RequiredSkill; // required skill
uint16 RequiredSkillLevel; // required skill level

View file

@ -153,36 +153,36 @@ namespace MAGICFX
}
// *************************************************************************************
TMagicFx healtoMagicFx( sint32 healHp, sint32 healSap, sint32 healSta, bool link )
TMagicFx healtoMagicFx( sint32 healChaScore1, sint32 healChaScore3, sint32 healChaScore2, bool link )
{
if ( !link )
{
if ( healHp > healSap )
if ( healChaScore1 > healChaScore3 )
{
if ( healHp > healSta )
return HealHP;
return HealSta;
if ( healChaScore1 > healChaScore2 )
return HealChaScore1;
return HealChaScore2;
}
else
{
if ( healSap > healSta )
return HealSap;
return HealSta;
if ( healChaScore3 > healChaScore2 )
return HealChaScore3;
return HealChaScore2;
}
}
else
{
if ( healHp > healSap )
if ( healChaScore1 > healChaScore3 )
{
if ( healHp > healSta )
return HealHP;
return HealSta;
if ( healChaScore1 > healChaScore2 )
return HealChaScore1;
return HealChaScore2;
}
else
{
if ( healSap > healSta )
return HealSap;
return HealSta;
if ( healChaScore3 > healChaScore2 )
return HealChaScore3;
return HealChaScore2;
}
}
}

View file

@ -93,9 +93,9 @@ namespace MAGICFX
Fear = 18, // ok
// curatif
HealHP = 15,
HealSap = 16,
HealSta = 17,
HealChaScore1 = 15,
HealChaScore3 = 16,
HealChaScore2 = 17,
Stun = 19,
@ -113,7 +113,7 @@ namespace MAGICFX
};
TMagicFx toMagicFx( DMGTYPE::EDamageType type ,bool Link);
TMagicFx toMagicFx( EFFECT_FAMILIES::TEffectFamily effect);
TMagicFx healtoMagicFx( sint32 healHp, sint32 healSap, sint32 healSta, bool link );
TMagicFx healtoMagicFx( sint32 healChaScore1, sint32 healChaScore3, sint32 healChaScore2, bool link );
// enum for the auras fxs
@ -122,9 +122,9 @@ namespace MAGICFX
NoAura = 0,
Divinity = 1,
SpeedMove = 2,
AuraSap = 3,
AuraSta = 4,
AuraHp = 5,
AuraChaScore3 = 3,
AuraChaScore2 = 4,
AuraChaScore1 = 5,
ProtectionMelee = 6,
ProtectionRange = 7,
ProtectionMagic = 8,

View file

@ -100,7 +100,7 @@ namespace MBEHAV
NL_STRING_CONVERSION_TABLE_ENTRY (CAST_ELEC)
NL_STRING_CONVERSION_TABLE_ENTRY (CAST_FEAR)
NL_STRING_CONVERSION_TABLE_ENTRY (CAST_FIRE)
NL_STRING_CONVERSION_TABLE_ENTRY (CAST_HEALHP)
NL_STRING_CONVERSION_TABLE_ENTRY (CAST_HEALChaScore1)
NL_STRING_CONVERSION_TABLE_ENTRY (CAST_MAD)
NL_STRING_CONVERSION_TABLE_ENTRY (CAST_POISON)
NL_STRING_CONVERSION_TABLE_ENTRY (CAST_ROOT)
@ -135,13 +135,6 @@ namespace MBEHAV
// Combat creature
NL_STRING_CONVERSION_TABLE_ENTRY (CREATURE_ATTACK_0)
NL_STRING_CONVERSION_TABLE_ENTRY (CREATURE_ATTACK_1)
// New talents
NL_STRING_CONVERSION_TABLE_ENTRY (JUGGLE)
NL_STRING_CONVERSION_TABLE_ENTRY (DANSE)
NL_STRING_CONVERSION_TABLE_ENTRY (PAINT_INIT)
NL_STRING_CONVERSION_TABLE_ENTRY (PAINT_LOOP)
NL_STRING_CONVERSION_TABLE_ENTRY (PAINT_END)
NL_END_STRING_CONVERSION_TABLE(EBehaviour, BehaviourConversion, UNKNOWN_BEHAVIOUR)

View file

@ -235,7 +235,7 @@ namespace MBEHAV
CAST_ELEC,
CAST_FEAR,
CAST_FIRE,
CAST_HEALHP,
CAST_HEALChaScore1,
CAST_MAD,
CAST_POISON,
CAST_ROOT,
@ -286,16 +286,6 @@ namespace MBEHAV
EMOTE_BEGIN, // 46
EMOTE_END = EMOTE_BEGIN+150,
//--------- JUGGLE ----------//
JUGGLE,
//--------- DANSE ----------//,
DANSE,
//--------- PAINT ----------//
PAINT_INIT,
PAINT_LOOP,
PAINT_END,
// IMPORTANT : IF YOU MODIFY THIS ENUM DO NOT FORGET TO CHANGE stringToBehaviour() TOO
NUMBER_OF_BEHAVIOURS
@ -460,17 +450,17 @@ namespace MBEHAV
TBehaviour8 Behaviour;
sint16 DeltaHP;
sint16 DeltaChaScore1;
uint16 Unused; /// Keep it, used to make the class size = 64 bits (sizeof(CBehaviour) MUST return 8 (bytes))
inline CBehaviour() : Data(0), Data2(0), Behaviour(UNKNOWN_BEHAVIOUR), DeltaHP(0), Unused(0) {}
inline CBehaviour() : Data(0), Data2(0), Behaviour(UNKNOWN_BEHAVIOUR), DeltaChaScore1(0), Unused(0) {}
inline CBehaviour( EBehaviour behaviour )
{
Unused = 0;
Data = 0;
Data2 = 0;
DeltaHP = 0;
DeltaChaScore1 = 0;
Behaviour = behaviour;
}
@ -479,7 +469,7 @@ namespace MBEHAV
Unused = 0;
Data = data1;
Data2 = data2;
DeltaHP = 0;
DeltaChaScore1 = 0;
Behaviour = behaviour;
}
@ -495,19 +485,19 @@ namespace MBEHAV
/* Problem: Olivier use a (sint64*) cast on a CBehaviour*, so this operator isn't called ! :'( */
/* must use Member declaration order to match 'brutal' cast */
/************************************************************************/
//return (((uint64)(DeltaHP)) << 32) + (((uint64)(Data2)) << 24) + (((uint64)(Data)) << 8) + Behaviour;
return (((uint64)(DeltaHP)) << 32) + (((uint64)(Behaviour)) << 24) + (((uint64)(Data2)) << 16) + Data;
//return (((uint64)(DeltaChaScore1)) << 32) + (((uint64)(Data2)) << 24) + (((uint64)(Data)) << 8) + Behaviour;
return (((uint64)(DeltaChaScore1)) << 32) + (((uint64)(Behaviour)) << 24) + (((uint64)(Data2)) << 16) + Data;
}
inline CBehaviour& operator= ( uint64 raw )
{
/*
DeltaHP = (sint16)(raw >> 32) ;
DeltaChaScore1 = (sint16)(raw >> 32) ;
Data2 = (uint8)(raw >> 24) ;
Data = (uint16)(raw >> 8) ;
Behaviour = TBehaviour8( (EBehaviour)(raw & 0xFF) );
*/
DeltaHP = (sint16)(raw >> 32) ;
DeltaChaScore1 = (sint16)(raw >> 32) ;
Behaviour = TBehaviour8( (EBehaviour)((raw >> 24)& 0xFF) );
Data2 = uint8((raw >> 16) & 0xff);
Data = uint16(raw & 0xffff);
@ -516,7 +506,7 @@ namespace MBEHAV
inline CBehaviour& operator= ( EBehaviour behaviour )
{
DeltaHP = 0;
DeltaChaScore1 = 0;
Data = 0;
Data2 = 0;
Behaviour = behaviour;
@ -524,13 +514,13 @@ namespace MBEHAV
}
inline CBehaviour& operator = ( const CBehaviour& p )
{ DeltaHP = p.DeltaHP; Behaviour = p.Behaviour; Data = p.Data; Data2 = p.Data2; return *this; }
{ DeltaChaScore1 = p.DeltaChaScore1; Behaviour = p.Behaviour; Data = p.Data; Data2 = p.Data2; return *this; }
inline bool operator == ( const CBehaviour& p ) const
{ return (DeltaHP == p.DeltaHP && Behaviour == (EBehaviour)p.Behaviour && Data == p.Data && Data2 == p.Data2); }
{ return (DeltaChaScore1 == p.DeltaChaScore1 && Behaviour == (EBehaviour)p.Behaviour && Data == p.Data && Data2 == p.Data2); }
inline bool operator != ( const CBehaviour& p ) const
{ return (Behaviour != (EBehaviour)p.Behaviour || Data != p.Data || Data2 != p.Data2 || DeltaHP != p.DeltaHP); }
{ return (Behaviour != (EBehaviour)p.Behaviour || Data != p.Data || Data2 != p.Data2 || DeltaChaScore1 != p.DeltaChaScore1); }
inline void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
{
@ -551,7 +541,7 @@ namespace MBEHAV
/// methode toString()
inline std::string toString() const
{
std::string text = behaviourToString( Behaviour ) + " " + NLMISC::toString(Data) + " "+NLMISC::toString(Data2)+" "+ NLMISC::toString(DeltaHP);
std::string text = behaviourToString( Behaviour ) + " " + NLMISC::toString(Data) + " "+NLMISC::toString(Data2)+" "+ NLMISC::toString(DeltaChaScore1);
return text;
}

View file

@ -28,21 +28,21 @@ namespace POWERS
NL_STRING_CONVERSION_TABLE_ENTRY(Taunt)
NL_STRING_CONVERSION_TABLE_ENTRY(Shielding)
NL_STRING_CONVERSION_TABLE_ENTRY(SpeedingUp)
NL_STRING_CONVERSION_TABLE_ENTRY(LifeConcentration)
NL_STRING_CONVERSION_TABLE_ENTRY(StaminaConcentration)
NL_STRING_CONVERSION_TABLE_ENTRY(SapConcentration)
NL_STRING_CONVERSION_TABLE_ENTRY(ConvertStamina)
NL_STRING_CONVERSION_TABLE_ENTRY(ConvertSap)
NL_STRING_CONVERSION_TABLE_ENTRY(ChaScore1Concentration)
NL_STRING_CONVERSION_TABLE_ENTRY(ChaScore2Concentration)
NL_STRING_CONVERSION_TABLE_ENTRY(ChaScore3Concentration)
NL_STRING_CONVERSION_TABLE_ENTRY(ConvertChaScore2)
NL_STRING_CONVERSION_TABLE_ENTRY(ConvertChaScore3)
NL_STRING_CONVERSION_TABLE_ENTRY(Berserk)
NL_STRING_CONVERSION_TABLE_ENTRY(BalanceHp)
NL_STRING_CONVERSION_TABLE_ENTRY(BalanceChaScore1)
NL_STRING_CONVERSION_TABLE_ENTRY(Heal)
NL_STRING_CONVERSION_TABLE_ENTRY(Invulnerability)
NL_STRING_CONVERSION_TABLE_ENTRY(EnchantWeapon)
NL_STRING_CONVERSION_TABLE_ENTRY(HealHpC)
NL_STRING_CONVERSION_TABLE_ENTRY(HealSapC)
NL_STRING_CONVERSION_TABLE_ENTRY(HealStaC)
NL_STRING_CONVERSION_TABLE_ENTRY(HealFocusC)
NL_STRING_CONVERSION_TABLE_ENTRY(HealChaScore1C)
NL_STRING_CONVERSION_TABLE_ENTRY(HealChaScore3C)
NL_STRING_CONVERSION_TABLE_ENTRY(HealChaScore2C)
NL_STRING_CONVERSION_TABLE_ENTRY(HealChaScore4C)
NL_STRING_CONVERSION_TABLE_ENTRY(ChgCharac)
NL_STRING_CONVERSION_TABLE_ENTRY(ModDefenseSkill)
@ -60,9 +60,9 @@ namespace POWERS
NL_STRING_CONVERSION_TABLE_ENTRY(ModPrimaryRootForageSkill)
NL_STRING_CONVERSION_TABLE_ENTRY(ModMagicProtection)
NL_STRING_CONVERSION_TABLE_ENTRY(LifeAura)
NL_STRING_CONVERSION_TABLE_ENTRY(StaminaAura)
NL_STRING_CONVERSION_TABLE_ENTRY(SapAura)
NL_STRING_CONVERSION_TABLE_ENTRY(ChaScore1Aura)
NL_STRING_CONVERSION_TABLE_ENTRY(ChaScore2Aura)
NL_STRING_CONVERSION_TABLE_ENTRY(ChaScore3Aura)
NL_STRING_CONVERSION_TABLE_ENTRY(MeleeProtection)
NL_STRING_CONVERSION_TABLE_ENTRY(Umbrella)
NL_STRING_CONVERSION_TABLE_ENTRY(AntiMagicShield)

View file

@ -33,22 +33,22 @@ namespace POWERS
Taunt = BeginPower,
Shielding,
SpeedingUp,
LifeConcentration,
StaminaConcentration,
SapConcentration,
ConvertStamina,
ConvertSap,
ChaScore1Concentration,
ChaScore2Concentration,
ChaScore3Concentration,
ConvertChaScore2,
ConvertChaScore3,
Berserk,
BalanceHp,
BalanceChaScore1,
Heal,
Invulnerability,
EnchantWeapon,
// consumable item related powers
HealHpC,
HealSapC,
HealStaC,
HealFocusC,
HealChaScore1C,
HealChaScore3C,
HealChaScore2C,
HealChaScore4C,
ChgCharac,
ModDefenseSkill,
ModDodgeSkill,
@ -67,9 +67,9 @@ namespace POWERS
EndPower = ModMagicProtection,
BeginAuras,
LifeAura = BeginAuras,
StaminaAura,
SapAura,
ChaScore1Aura = BeginAuras,
ChaScore2Aura,
ChaScore3Aura,
MeleeProtection,
Umbrella,
AntiMagicShield,

View file

@ -44,8 +44,8 @@ TPropertyIndex DSPropertyENTITY_MOUNTED_ID = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyRIDER_ENTITY_ID = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyCELL = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyVISION_COUNTER = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyCURRENT_HIT_POINTS = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyMAX_HIT_POINTS = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyCURRENT_ChaScore1 = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyMAX_ChaScore1 = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyCURRENT_RUN_SPEED = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyCURRENT_WALK_SPEED = INVALID_PROPERTY_INDEX;
TPropertyIndex DSPropertyBEST_ROLE = INVALID_PROPERTY_INDEX;
@ -137,8 +137,8 @@ void initRyzomVisualPropertyIndices( CMirroredDataSet& dataset )
assignProp( RIDER_ENTITY_ID, RiderEntity );
assignProp( CELL, Cell );
assignProp( VISION_COUNTER, VisionCounter );
assignProp( CURRENT_HIT_POINTS, CurrentHitPoints );
assignProp( MAX_HIT_POINTS, MaxHitPoints );
assignProp( CURRENT_ChaScore1, CurrentChaScore1 );
assignProp( MAX_ChaScore1, MaxChaScore1 );
assignProp( CURRENT_RUN_SPEED, CurrentRunSpeed );
assignProp( CURRENT_WALK_SPEED, CurrentWalkSpeed );
assignProp( BEST_ROLE, BestRole );

View file

@ -53,8 +53,8 @@ extern TPropertyIndex DSPropertyENTITY_MOUNTED_ID;
extern TPropertyIndex DSPropertyRIDER_ENTITY_ID;
extern TPropertyIndex DSPropertyCELL;
extern TPropertyIndex DSPropertyVISION_COUNTER;
extern TPropertyIndex DSPropertyCURRENT_HIT_POINTS;
extern TPropertyIndex DSPropertyMAX_HIT_POINTS;
extern TPropertyIndex DSPropertyCURRENT_ChaScore1;
extern TPropertyIndex DSPropertyMAX_ChaScore1;
extern TPropertyIndex DSPropertyCURRENT_RUN_SPEED;
extern TPropertyIndex DSPropertyCURRENT_WALK_SPEED;
extern TPropertyIndex DSPropertyBEST_ROLE;
@ -109,8 +109,8 @@ void initRyzomVisualPropertyIndices( CMirroredDataSet& dataset );
#define TYPE_CELL sint32
#define TYPE_VISION_COUNTER uint8
#define TYPE_CURRENT_HIT_POINTS sint32
#define TYPE_MAX_HIT_POINTS sint32
#define TYPE_CURRENT_ChaScore1 sint32
#define TYPE_MAX_ChaScore1 sint32
#define TYPE_RUNSPEED float
#define TYPE_WALKSPEED float
#define TYPE_BEST_ROLE uint16

View file

@ -30,10 +30,10 @@ namespace SCORES
// The conversion table
const CStringConversion<TScores>::CPair stringTable [] =
{
{ "HitPoints", hit_points },
{ "Stamina", stamina },
{ "Sap", sap },
{ "Focus", focus },
{ "ChaScore1", cha_score1 },
{ "ChaScore2", cha_score2 },
{ "ChaScore3", cha_score3 },
{ "ChaScore4", cha_score4 },
};
CStringConversion<TScores> conversion(stringTable, sizeof(stringTable) / sizeof(stringTable[0]), unknown);

View file

@ -27,10 +27,10 @@ namespace SCORES
{
enum TScores
{
hit_points = 0,
stamina,
sap,
focus,
cha_score1 = 0,
cha_score2,
cha_score3,
cha_score4,
NUM_SCORES,
unknown = NUM_SCORES

View file

@ -3145,13 +3145,13 @@ void CServerAnimationModule::onCharTargetReceived( NLNET::IModuleProxy *senderMo
if ( (animationProp & CAnimationProp::Alive) )
{
if (args[0] == "ADD_HP") { CAiWrapper::getInstance().setHPLevel(rtNpc->EntityId, alias, 1); return; }
if (args[0] == "ADD_ChaScore1") { CAiWrapper::getInstance().setChaScore1Level(rtNpc->EntityId, alias, 1); return; }
if (args[0] == "KILL_NPC" && alived) { CAiWrapper::getInstance().setHPLevel(rtNpc->EntityId, alias, 0); return; }
if (args[0] == "ADD_HP") { CAiWrapper::getInstance().setHPLevel(rtNpc->EntityId, alias, 1); return; }
if (args[0] == "KILL_NPC" && alived) { CAiWrapper::getInstance().setChaScore1Level(rtNpc->EntityId, alias, 0); return; }
if (args[0] == "ADD_ChaScore1") { CAiWrapper::getInstance().setChaScore1Level(rtNpc->EntityId, alias, 1); return; }
if (args[0] == "GRP_KILL" && alived) { CAiWrapper::getInstance().setGrpHPLevel(rtNpc->EntityId, alias, 0); return; }
if (args[0] == "GRP_HEAL") { CAiWrapper::getInstance().setGrpHPLevel(rtNpc->EntityId, alias, 1); return; }
if (args[0] == "GRP_KILL" && alived) { CAiWrapper::getInstance().setGrpChaScore1Level(rtNpc->EntityId, alias, 0); return; }
if (args[0] == "GRP_HEAL") { CAiWrapper::getInstance().setGrpChaScore1Level(rtNpc->EntityId, alias, 1); return; }

View file

@ -178,14 +178,14 @@
<ATOM Name="weight" Value="3"/>
</STRUCT>
<STRUCT>
<ATOM Name="name" Value="CurrentHitPoints"/>
<ATOM Name="name" Value="CurrentChaScore1“/>
<ATOM Name="type" Value="sint32"/>
<ATOM Name="persistant" Value="true"/>
<ATOM Name="mirror" Value="true"/>
<ATOM Name="weight" Value="1"/>
</STRUCT>
<STRUCT>
<ATOM Name="name" Value="MaxHitPoints"/>
<ATOM Name="name" Value="MaxChaScore1“/>
<ATOM Name="type" Value="sint32"/>
<ATOM Name="persistant" Value="false"/>
<ATOM Name="mirror" Value="true"/>

View file

@ -415,22 +415,22 @@ void CAIS::update()
_FaunaDescriptionList.Bots.clear();
_FaunaDescriptionList.GrpAlias.clear();
}
// send agglomerated hp changes
if (!_CreatureChangeHPList.Entities.empty())
// send agglomerated ChaScore1 changes
if (!_CreatureChangeChaScore1List.Entities.empty())
{
nlassert(_CreatureChangeHPList.Entities.size()==_CreatureChangeHPList.DeltaHp.size());
_CreatureChangeHPList.send("EGS");
_CreatureChangeHPList.Entities.clear();
_CreatureChangeHPList.DeltaHp.clear();
nlassert(_CreatureChangeChaScore1List.Entities.size()==_CreatureChangeChaScore1List.DeltaChaScore1.size());
_CreatureChangeChaScore1List.send("EGS");
_CreatureChangeChaScore1List.Entities.clear();
_CreatureChangeChaScore1List.DeltaChaScore1.clear();
}
if (!_CreatureChangeMaxHPList.Entities.empty())
if (!_CreatureChangeMaxChaScore1List.Entities.empty())
{
nlassert(_CreatureChangeMaxHPList.Entities.size()==_CreatureChangeMaxHPList.MaxHp.size());
nlassert(_CreatureChangeMaxHPList.Entities.size()==_CreatureChangeMaxHPList.SetFull.size());
_CreatureChangeMaxHPList.send("EGS");
_CreatureChangeMaxHPList.Entities.clear();
_CreatureChangeMaxHPList.MaxHp.clear();
_CreatureChangeMaxHPList.SetFull.clear();
nlassert(_CreatureChangeMaxChaScore1List.Entities.size()==_CreatureChangeMaxChaScore1List.MaxChaScore1.size());
nlassert(_CreatureChangeMaxChaScore1List.Entities.size()==_CreatureChangeMaxChaScore1List.SetFull.size());
_CreatureChangeMaxChaScore1List.send("EGS");
_CreatureChangeMaxChaScore1List.Entities.clear();
_CreatureChangeMaxChaScore1List.MaxChaScore1.clear();
_CreatureChangeMaxChaScore1List.SetFull.clear();
}
}

View file

@ -217,14 +217,14 @@ public:
{
return _FaunaDescriptionList;
}
CChangeCreatureHPMsg &getCreatureChangeHP()
CChangeCreatureChaScore1Msg &getCreatureChangeChaScore1()
{
return _CreatureChangeHPList;
return _CreatureChangeChaScore1List;
}
CChangeCreatureMaxHPMsg &getCreatureChangeMaxHP()
CChangeCreatureMaxChaScore1Msg &getCreatureChangeMaxChaScore1()
{
return _CreatureChangeMaxHPList;
return _CreatureChangeMaxChaScore1List;
}
enum TSearchType
@ -292,8 +292,8 @@ private:
// Faunas descriptions to be sent each frame
CFaunaBotDescription _FaunaDescriptionList;
CChangeCreatureHPMsg _CreatureChangeHPList;
CChangeCreatureMaxHPMsg _CreatureChangeMaxHPList;
CChangeCreatureChaScore1Msg _CreatureChangeChaScore1List;
CChangeCreatureMaxChaScore1Msg _CreatureChangeMaxChaScore1List;
/// The emot identifiers
std::map<std::string, uint32> _EmotNames;

View file

@ -350,13 +350,13 @@ void CSpawnBot::sendInfoToEGS() const
if (!EGSHasMirrorReady)
return;
const uint32& maxHp = getPersistent().getCustomMaxHp();
if (maxHp > 0.f)
const uint32& maxChaScore1 = getPersistent().getCustomMaxChaScore1();
if (maxChaScore1 > 0.f)
{
CChangeCreatureMaxHPMsg& msgList = CAIS::instance().getCreatureChangeMaxHP();
CChangeCreatureMaxChaScore1Msg& msgList = CAIS::instance().getCreatureChangeMaxChaScore1();
msgList.Entities.push_back(dataSetRow());
msgList.MaxHp.push_back((uint32)(maxHp));
msgList.MaxChaScore1.push_back((uint32)(maxChaScore1));
msgList.SetFull.push_back((uint8)(1));
}
}
@ -377,7 +377,7 @@ CBot::CBot(CGroup* owner, CAIAliasDescriptionNode* alias)
, _SetSheetData(NULL)
, _Observers(NULL)
, _ProfileData(NULL)
, _CustomMaxHp(0)
, _CustomMaxChaScore1(0)
{
}
@ -392,7 +392,7 @@ CBot::CBot(CGroup* owner, uint32 alias, std::string const& name)
, _SetSheetData(NULL)
, _Observers(NULL)
, _ProfileData(NULL)
, _CustomMaxHp(0.f)
, _CustomMaxChaScore1(0.f)
{
}

View file

@ -257,8 +257,8 @@ public:
const ucstring& getCustomName() const { return _CustomName; }
void setCustomName(const ucstring &name) { _CustomName = name; }
const uint32& getCustomMaxHp() const { return _CustomMaxHp; }
void setCustomMaxHp(const uint32 &maxHp) { _CustomMaxHp = maxHp; }
const uint32& getCustomMaxChaScore1() const { return _CustomMaxChaScore1; }
void setCustomMaxChaScore1(const uint32 &maxChaScore1) { _CustomMaxChaScore1 = maxChaScore1; }
virtual void setClientSheet(const std::string & clientSheetName);
@ -290,7 +290,7 @@ private:
bool _Healer;
bool _BuildingBot;
ucstring _CustomName;
uint32 _CustomMaxHp;
uint32 _CustomMaxChaScore1;
CTimer _SetSheetTimer;
struct CSetSheetData
{

View file

@ -501,7 +501,7 @@ void CSpawnBotFauna::getBestTarget()
if ( canMove()
&& !player->isAggressive()
&& entity->wpos().isValid()
&& isPlaceAllowed(entity->getAStarFlag(), entity->wpos().getFlags()))
&& (entity->wpos().getFlags()&entity->getAStarFlag())==0)
{
// Suppose we can go to him
bool canChange = true;
@ -676,7 +676,7 @@ void CSpawnBotFauna::getBestTarget()
if (runSpeed()>entity->runSpeed())
{
// got enought life ? (more than 75%).
if ((4*currentHitPoints())>(3*maxHitPoints()))
if ((4*currentChaScore1())>(3*maxChaScore1()))
{
// check if the herbivore is in the current place
const CAIPlace *place=spawnGrp().targetPlace();
@ -706,7 +706,7 @@ void CSpawnBotFauna::getBestTarget()
if ( profile
&& profile->getAIProfileType()==ACTIVITY_CORPSE
&& botCreat->wpos().isValid()
&& isPlaceAllowed(botCreat->getAStarFlag(), botCreat->wpos().getFlags())
&& !(botCreat->wpos().getFlags()&botCreat->getAStarFlag())
)
{
CCorpseFaunaProfile *corpseProfile=NLMISC::safe_cast<CCorpseFaunaProfile*>(profile);
@ -951,7 +951,7 @@ void CMovementMagnet::getNewDestination(RYAI_MAP_CRUNCH::CWorldPosition const& a
continue;
if ( !faunaBot->wpos().isValid()
|| !isPlaceAllowed(denyFlag, faunaBot->wpos().getFlags()))
|| (faunaBot->wpos().getFlags()&denyFlag)!=0)
continue;
// can be optimize by in avoid inversion.
@ -990,7 +990,7 @@ void CMovementMagnet::getNewDestination(RYAI_MAP_CRUNCH::CWorldPosition const& a
// check if its a nogo and water proof position.
if ( !wRndPos.isValid()
|| !isPlaceAllowed(denyFlag, wRndPos.getTopologyRef().getCstTopologyNode().getFlags()))
|| (wRndPos.getTopologyRef().getCstTopologyNode().getFlags()&denyFlag)!=0 )
continue;
#if !FINAL_VERSION
@ -1126,7 +1126,7 @@ CReturnMovementMagnet::CReturnMovementMagnet(RYAI_MAP_CRUNCH::CWorldPosition con
void CReturnMovementMagnet::getNewDestination(RYAI_MAP_CRUNCH::CWorldPosition const& alternativePos, RYAI_MAP_CRUNCH::TAStarFlag denyFlag)
{
if (_ForcedDest.isValid() && isPlaceAllowed(denyFlag, _ForcedDest.getTopologyRef().getCstTopologyNode().getFlags()))
if (_ForcedDest.isValid() && (_ForcedDest.getTopologyRef().getCstTopologyNode().getFlags()&denyFlag)==0)
_PathCont.setDestination(_ForcedDest);
else
CMovementMagnet::getNewDestination(alternativePos, denyFlag);

View file

@ -46,7 +46,7 @@ static bool VerboseLog = false;
CSpawnBotNpc::CSpawnBotNpc(TDataSetRow const& row, CBot& owner, NLMISC::CEntityId const& id, float radius, uint32 level, RYAI_MAP_CRUNCH::TAStarFlag denyFlags)
: CSpawnBot(row, owner, id, radius, level, denyFlags)
{
_OldHpPercentage = -1.f;
_OldChaScore1Percentage = -1.f;
_NbCurrentDynChats = 0;
_FacingTheta = 0;
_FacingTick = 0;
@ -115,22 +115,22 @@ void CSpawnBotNpc::processEvent(CCombatInterface::CEvent const& event)
++AISStat::BotNpcUpdCtr;
{
H_AUTO(AIHpTrig);
// Fix for HP triggers
H_AUTO(AIChaScore1Trig);
// Fix for ChaScore1 triggers
// :FIXME: Clean that triggering stuff, make it generic
CGroupNpc& persGrp = spawnGrp().getPersistent();
if (persGrp.haveHpTriggers())
if (persGrp.haveChaScore1Triggers())
{
float newHpPercentage = getPhysical().hpPercentage();
if (_OldHpPercentage>=0.f && newHpPercentage!=_OldHpPercentage)
float newChaScore1Percentage = getPhysical().ChaScore1Percentage();
if (_OldChaScore1Percentage>=0.f && newChaScore1Percentage!=_OldChaScore1Percentage)
{
persGrp.hpTriggerCb(_OldHpPercentage, newHpPercentage);
persGrp.ChaScore1TriggerCb(_OldChaScore1Percentage, newChaScore1Percentage);
}
_OldHpPercentage = newHpPercentage;
_OldChaScore1Percentage = newChaScore1Percentage;
}
else
{
_OldHpPercentage = getPhysical().hpPercentage();
_OldChaScore1Percentage = getPhysical().ChaScore1Percentage();
}
}

View file

@ -101,7 +101,7 @@ public:
private:
std::vector<CBotPlayer*> _ActiveChats; // vector of ptrs to players currently chatting with bot
float _OldHpPercentage; // Fix for HP triggers
float _OldChaScore1Percentage; // Fix for ChaScore1 triggers
CNpcChatProfileImp _CurrentChatProfile;
sint32 _NbCurrentDynChats;

View file

@ -234,7 +234,7 @@ public:
CAICoord const& y() const { return _pos.y(); }
sint32 h() const { return _pos.h(); }
CAngle theta() const { return _pos.theta(); }
float hpPercentage() const { return (float)currentHitPoints()/(float)maxHitPoints(); }
float ChaScore1Percentage() const { return (float)currentChaScore1()/(float)maxChaScore1(); }
TDataSetRow const& dataSetRow() const { return _dataSetRow; }
uint32 level() const { return _Level; }
RYAI_MAP_CRUNCH::CWorldPosition const& wpos() const { return _wpos; }
@ -244,8 +244,8 @@ public:
/// @name Mirror accessors
//@{
TYPE_CURRENT_HIT_POINTS currentHitPoints() const { return _CurrentHitPoint(); }
TYPE_MAX_HIT_POINTS maxHitPoints() const { return _MaxHitPoint(); }
TYPE_CURRENT_ChaScore1 currentChaScore1() const { return _CurrentChaScore1(); }
TYPE_MAX_ChaScore1 maxChaScore1() const { return _MaxChaScore1(); }
TYPE_VISION_COUNTER currentVisionCounter() const { return _VisionCounter(); }
bool havePlayersAround() const;
@ -345,8 +345,8 @@ private:
CMirrorPropValueRO<float> _RunSpeed;
CMirrorPropValueRO<float> _WalkSpeed;
CMirrorPropValueRO<TYPE_CURRENT_HIT_POINTS> _CurrentHitPoint;
CMirrorPropValueRO<TYPE_MAX_HIT_POINTS> _MaxHitPoint;
CMirrorPropValueRO<TYPE_CURRENT_ChaScore1> _CurrentChaScore1;
CMirrorPropValueRO<TYPE_MAX_ChaScore1> _MaxChaScore1;
CMirrorPropValueRO<TYPE_VISION_COUNTER> _VisionCounter;
CMirrorPropValue<TYPE_IN_OUTPOST_ZONE_ALIAS> _InOutpostAlias;
CMirrorPropValue<TYPE_IN_OUTPOST_ZONE_SIDE> _InOutpostSide;

View file

@ -64,8 +64,8 @@ CAIEntityPhysical::CAIEntityPhysical(CPersistentOfPhysical& owner, TDataSetRow c
_RunSpeed.init (*CMirrors::DataSet, entityIndex, DSPropertyCURRENT_RUN_SPEED);
_WalkSpeed.init (*CMirrors::DataSet, entityIndex, DSPropertyCURRENT_WALK_SPEED);
_CurrentHitPoint.init (*CMirrors::DataSet, entityIndex, DSPropertyCURRENT_HIT_POINTS);
_MaxHitPoint.init (*CMirrors::DataSet, entityIndex, DSPropertyMAX_HIT_POINTS);
_CurrentChaScore1.init (*CMirrors::DataSet, entityIndex, DSPropertyCURRENT_ChaScore1);
_MaxChaScore1.init (*CMirrors::DataSet, entityIndex, DSPropertyMAX_ChaScore1);
_VisionCounter.init (*CMirrors::DataSet, entityIndex, DSPropertyVISION_COUNTER);
_InOutpostAlias.init (*CMirrors::DataSet, entityIndex, DSPropertyIN_OUTPOST_ZONE_ALIAS);
_InOutpostSide.init (*CMirrors::DataSet, entityIndex, DSPropertyIN_OUTPOST_ZONE_SIDE);

View file

@ -309,7 +309,7 @@ void CBotProfileFlee::updateProfile(uint ticksSinceLastUpdate)
{
RYAI_MAP_CRUNCH::CWorldPosition wpos=rootCell->getWorldPosition(_Bot->getPersistent().getChildIndex()&3);
if ( wpos.isValid()
&& isPlaceAllowed(_DenyFlags, wpos.getFlags())) // verify that we got some compatible flags ..
&& (wpos.getFlags()&_DenyFlags)==0 ) // verify that we got some compatible flags ..
{
_LastDir=startDir;
_LastStartPos=_Bot->wpos();
@ -378,12 +378,12 @@ bool CFightOrganizer::healIteration(CBot* bot, CBot* otherBot)
CSpawnBot* otherSpBot = otherBot->getSpawnObj();
if (spBot && otherSpBot && otherSpBot->isAlive())
{
float hp = otherSpBot->hpPercentage();
float ChaScore1 = otherSpBot->ChaScore1Percentage();
int neededHealers = 0;
if (hp<.90f) ++neededHealers;
if (hp<.75f) ++neededHealers;
if (hp<.50f) ++neededHealers;
if (hp<.25f) ++neededHealers;
if (ChaScore1<.90f) ++neededHealers;
if (ChaScore1<.75f) ++neededHealers;
if (ChaScore1<.50f) ++neededHealers;
if (ChaScore1<.25f) ++neededHealers;
if (neededHealers > otherSpBot->getHealerCount())
{
IAIProfile* profile = spBot->getAIProfile();

View file

@ -374,7 +374,7 @@ bool s_move(
0.5f);
// If we can't follow the path or the computed pos is invalid
if ( status==CFollowPath::FOLLOW_NO_PATH
|| (_Bot->wpos().isValid() && !isPlaceAllowed(_Bot->getAStarFlag(), _Bot->wpos().getFlags())))
|| (_Bot->wpos().isValid() && (_Bot->wpos().getFlags()&_Bot->getAStarFlag())!=0))
{
// Restore position
_Bot->setPos(lastPos);
@ -534,7 +534,7 @@ static void s_updateProfile(
target = _Bot->getTarget();
}
// Assert target is valid and alive
if (!target || !target->isAlive() || (heal && target->hpPercentage()>.9f))
if (!target || !target->isAlive() || (heal && target->ChaScore1Percentage()>.9f))
{
// If we are hitting an invalid or dead target just wait we finish hitting, else disengage
if (!_Bot->isHitting())
@ -605,7 +605,7 @@ static void s_updateProfile(
_AtAttackDist = norm < _RangeMax;
// Check if target can be attacked
bool const targetInForbiddenZone = ((!target->wpos().isValid())||!isPlaceAllowed(_Bot->getAStarFlag(), target->wpos().getFlags()));
bool const targetInForbiddenZone = ((!target->wpos().isValid())||(target->wpos().getFlags()&_Bot->getAStarFlag())!=0);
/****************************************************************************/
/* Profile main processing */

View file

@ -726,17 +726,17 @@ void CGroupNpc::addParameter(std::string const& parameter)
}
}
void CGroupNpc::addHpUpTrigger(float threshold, int eventId)
void CGroupNpc::addChaScore1UpTrigger(float threshold, int eventId)
{
_hpUpTriggers.insert(std::make_pair(threshold, eventId));
_ChaScore1UpTriggers.insert(std::make_pair(threshold, eventId));
}
void CGroupNpc::delHpUpTrigger(float threshold, int eventId)
void CGroupNpc::delChaScore1UpTrigger(float threshold, int eventId)
{
CGroupNpc::THpTriggerList& hpTriggers = _hpUpTriggers;
CGroupNpc::THpTriggerList::iterator first, last, trigger;
first = hpTriggers.lower_bound(threshold);
last = hpTriggers.upper_bound(threshold);
CGroupNpc::TChaScore1TriggerList& ChaScore1Triggers = _ChaScore1UpTriggers;
CGroupNpc::TChaScore1TriggerList::iterator first, last, trigger;
first = ChaScore1Triggers.lower_bound(threshold);
last = ChaScore1Triggers.upper_bound(threshold);
for (; first!=last; ++first)
{
@ -744,20 +744,20 @@ void CGroupNpc::delHpUpTrigger(float threshold, int eventId)
break;
}
if (first!=last)
hpTriggers.erase(first);
ChaScore1Triggers.erase(first);
}
void CGroupNpc::addHpDownTrigger(float threshold, int eventId)
void CGroupNpc::addChaScore1DownTrigger(float threshold, int eventId)
{
_hpDownTriggers.insert(std::make_pair(threshold, eventId));
_ChaScore1DownTriggers.insert(std::make_pair(threshold, eventId));
}
void CGroupNpc::delHpDownTrigger(float threshold, int eventId)
void CGroupNpc::delChaScore1DownTrigger(float threshold, int eventId)
{
CGroupNpc::THpTriggerList& hpTriggers = _hpDownTriggers;
CGroupNpc::THpTriggerList::iterator first, last, trigger;
first = hpTriggers.lower_bound(threshold);
last = hpTriggers.upper_bound(threshold);
CGroupNpc::TChaScore1TriggerList& ChaScore1Triggers = _ChaScore1DownTriggers;
CGroupNpc::TChaScore1TriggerList::iterator first, last, trigger;
first = ChaScore1Triggers.lower_bound(threshold);
last = ChaScore1Triggers.upper_bound(threshold);
for (; first!=last; ++first)
{
@ -765,20 +765,20 @@ void CGroupNpc::delHpDownTrigger(float threshold, int eventId)
break;
}
if (first!=last)
hpTriggers.erase(first);
ChaScore1Triggers.erase(first);
}
void CGroupNpc::addHpUpTrigger(float threshold, std::string cbFunc)
void CGroupNpc::addChaScore1UpTrigger(float threshold, std::string cbFunc)
{
_hpUpTriggers2.insert(std::make_pair(threshold, cbFunc));
_ChaScore1UpTriggers2.insert(std::make_pair(threshold, cbFunc));
}
void CGroupNpc::delHpUpTrigger(float threshold, std::string cbFunc)
void CGroupNpc::delChaScore1UpTrigger(float threshold, std::string cbFunc)
{
CGroupNpc::THpTriggerList2& hpTriggers = _hpUpTriggers2;
CGroupNpc::THpTriggerList2::iterator first, last, trigger;
first = hpTriggers.lower_bound(threshold);
last = hpTriggers.upper_bound(threshold);
CGroupNpc::TChaScore1TriggerList2& ChaScore1Triggers = _ChaScore1UpTriggers2;
CGroupNpc::TChaScore1TriggerList2::iterator first, last, trigger;
first = ChaScore1Triggers.lower_bound(threshold);
last = ChaScore1Triggers.upper_bound(threshold);
for (; first!=last; ++first)
{
@ -786,20 +786,20 @@ void CGroupNpc::delHpUpTrigger(float threshold, std::string cbFunc)
break;
}
if (first!=last)
hpTriggers.erase(first);
ChaScore1Triggers.erase(first);
}
void CGroupNpc::addHpDownTrigger(float threshold, std::string cbFunc)
void CGroupNpc::addChaScore1DownTrigger(float threshold, std::string cbFunc)
{
_hpDownTriggers2.insert(std::make_pair(threshold, cbFunc));
_ChaScore1DownTriggers2.insert(std::make_pair(threshold, cbFunc));
}
void CGroupNpc::delHpDownTrigger(float threshold, std::string cbFunc)
void CGroupNpc::delChaScore1DownTrigger(float threshold, std::string cbFunc)
{
CGroupNpc::THpTriggerList2& hpTriggers = _hpDownTriggers2;
CGroupNpc::THpTriggerList2::iterator first, last, trigger;
first = hpTriggers.lower_bound(threshold);
last = hpTriggers.upper_bound(threshold);
CGroupNpc::TChaScore1TriggerList2& ChaScore1Triggers = _ChaScore1DownTriggers2;
CGroupNpc::TChaScore1TriggerList2::iterator first, last, trigger;
first = ChaScore1Triggers.lower_bound(threshold);
last = ChaScore1Triggers.upper_bound(threshold);
for (; first!=last; ++first)
{
@ -807,30 +807,30 @@ void CGroupNpc::delHpDownTrigger(float threshold, std::string cbFunc)
break;
}
if (first!=last)
hpTriggers.erase(first);
ChaScore1Triggers.erase(first);
}
bool CGroupNpc::haveHpTriggers()
bool CGroupNpc::haveChaScore1Triggers()
{
return (_hpUpTriggers.size()+_hpDownTriggers.size()+_hpUpTriggers2.size()+_hpDownTriggers2.size())>0;
return (_ChaScore1UpTriggers.size()+_ChaScore1DownTriggers.size()+_ChaScore1UpTriggers2.size()+_ChaScore1DownTriggers2.size())>0;
}
void CGroupNpc::hpTriggerCb(float oldVal, float newVal)
void CGroupNpc::ChaScore1TriggerCb(float oldVal, float newVal)
{
if (newVal>oldVal)
{
CGroupNpc::THpTriggerList::const_iterator first, last, trigger, triggerProcessed;
first = _hpUpTriggers.upper_bound(oldVal);
last = _hpUpTriggers.upper_bound(newVal);
CGroupNpc::TChaScore1TriggerList::const_iterator first, last, trigger, triggerProcessed;
first = _ChaScore1UpTriggers.upper_bound(oldVal);
last = _ChaScore1UpTriggers.upper_bound(newVal);
for (trigger=first; trigger!=last;)
{
triggerProcessed = trigger;
++trigger;
processStateEvent(getEventContainer().EventUserEvent[triggerProcessed->second]);
}
CGroupNpc::THpTriggerList2::const_iterator first2, last2, trigger2, triggerProcessed2;
first2 = _hpUpTriggers2.upper_bound(oldVal);
last2 = _hpUpTriggers2.upper_bound(newVal);
CGroupNpc::TChaScore1TriggerList2::const_iterator first2, last2, trigger2, triggerProcessed2;
first2 = _ChaScore1UpTriggers2.upper_bound(oldVal);
last2 = _ChaScore1UpTriggers2.upper_bound(newVal);
for (trigger2=first2; trigger2!=last2;)
{
triggerProcessed2 = trigger2;
@ -840,18 +840,18 @@ void CGroupNpc::hpTriggerCb(float oldVal, float newVal)
}
if (newVal<oldVal)
{
CGroupNpc::THpTriggerList::const_iterator first, last, trigger, triggerProcessed;
first = _hpDownTriggers.lower_bound(newVal);
last = _hpDownTriggers.lower_bound(oldVal);
CGroupNpc::TChaScore1TriggerList::const_iterator first, last, trigger, triggerProcessed;
first = _ChaScore1DownTriggers.lower_bound(newVal);
last = _ChaScore1DownTriggers.lower_bound(oldVal);
for (trigger=first; trigger!=last;)
{
triggerProcessed = trigger;
++trigger;
processStateEvent(getEventContainer().EventUserEvent[triggerProcessed->second]);
}
CGroupNpc::THpTriggerList2::const_iterator first2, last2, trigger2, triggerProcessed2;
first2 = _hpDownTriggers2.lower_bound(newVal);
last2 = _hpDownTriggers2.lower_bound(oldVal);
CGroupNpc::TChaScore1TriggerList2::const_iterator first2, last2, trigger2, triggerProcessed2;
first2 = _ChaScore1DownTriggers2.lower_bound(newVal);
last2 = _ChaScore1DownTriggers2.lower_bound(oldVal);
for (trigger2=first2; trigger2!=last2;)
{
triggerProcessed2 = trigger2;

View file

@ -201,18 +201,18 @@ public:
AITYPES::CPropertySetWithExtraList<TAllianceId> const& friendFaction() const { return _friendFaction; }
public:
void addHpUpTrigger(float threshold, int eventId);
void delHpUpTrigger(float threshold, int eventId);
void addHpUpTrigger(float threshold, std::string cbFunc);
void delHpUpTrigger(float threshold, std::string cbFunc);
void addChaScore1UpTrigger(float threshold, int eventId);
void delChaScore1UpTrigger(float threshold, int eventId);
void addChaScore1UpTrigger(float threshold, std::string cbFunc);
void delChaScore1UpTrigger(float threshold, std::string cbFunc);
void addHpDownTrigger(float threshold, int eventId);
void delHpDownTrigger(float threshold, int eventId);
void addHpDownTrigger(float threshold, std::string cbFunc);
void delHpDownTrigger(float threshold, std::string cbFunc);
void addChaScore1DownTrigger(float threshold, int eventId);
void delChaScore1DownTrigger(float threshold, int eventId);
void addChaScore1DownTrigger(float threshold, std::string cbFunc);
void delChaScore1DownTrigger(float threshold, std::string cbFunc);
bool haveHpTriggers();
void hpTriggerCb(float oldVal, float newVal);
bool haveChaScore1Triggers();
void ChaScore1TriggerCb(float oldVal, float newVal);
void addNamedEntityListener(std::string const& name, std::string const& prop, int event);
void delNamedEntityListener(std::string const& name, std::string const& prop, int event);
@ -258,12 +258,12 @@ private:
AITYPES::CPropertySetWithExtraList<TAllianceId> _ennemyFaction;
AITYPES::CPropertySetWithExtraList<TAllianceId> _friendFaction;
typedef std::multimap<float, int> THpTriggerList;
typedef std::multimap<float, std::string> THpTriggerList2;
THpTriggerList _hpUpTriggers;
THpTriggerList _hpDownTriggers;
THpTriggerList2 _hpUpTriggers2;
THpTriggerList2 _hpDownTriggers2;
typedef std::multimap<float, int> TChaScore1TriggerList;
typedef std::multimap<float, std::string> TChaScore1TriggerList2;
TChaScore1TriggerList _ChaScore1UpTriggers;
TChaScore1TriggerList _ChaScore1DownTriggers;
TChaScore1TriggerList2 _ChaScore1UpTriggers2;
TChaScore1TriggerList2 _ChaScore1DownTriggers2;
typedef std::multimap<std::pair<std::string, std::string>, int> TNamedEntityListenerList;
TNamedEntityListenerList _namedEntityListeners;

View file

@ -277,7 +277,7 @@ void CManagerPlayer::update()
void CManagerPlayer::addSpawnedPlayer(TDataSetRow const& dataSetRow, NLMISC::CEntityId const& id)
{
CBotPlayer* player = new CBotPlayer(this,dataSetRow,id,1); // :TODO: default player level calculation (skill & hp ?).
CBotPlayer* player = new CBotPlayer(this,dataSetRow,id,1); // :TODO: default player level calculation (skill & ChaScore1 ?).
addChild(player);
player->spawn();

View file

@ -784,7 +784,7 @@ void CGrpProfileBandit::updateProfile(uint ticksSinceLastUpdate)
CAIEntityPhysical *ep = player->getSpawnObj();
if ( ep
&& ep->isAlive()
&& ep->currentHitPoints()>0.f)
&& ep->currentChaScore1()>0.f)
{
const CRootCell *const rootCell=ep->wpos().getRootCell();
if ( rootCell
@ -863,7 +863,7 @@ void CGrpProfileBandit::updateProfile(uint ticksSinceLastUpdate)
if ( ep
&& ep->isAlive()
&& ep->currentHitPoints()>0.f) // not in safe zone.
&& ep->currentChaScore1()>0.f) // not in safe zone.
{
const CRootCell *const rootCell=ep->wpos().getRootCell();
if ( rootCell
@ -1111,7 +1111,7 @@ void CGrpProfileGuard::updateProfile(uint ticksSinceLastUpdate)
CAIEntityPhysical *const ep = player->getSpawnObj();
if ( !ep
|| !ep->isAlive()
|| ep->currentHitPoints()<=0.f
|| ep->currentChaScore1()<=0.f
|| ep->wpos().toAIVector().quickDistTo(centerPos)>aggroSize)
continue;
@ -1281,7 +1281,7 @@ void CGrpProfileTribu::updateProfile(uint ticksSinceLastUpdate)
CAIEntityPhysical *const ep = player->getSpawnObj();
if ( !ep
|| !ep->isAlive()
|| ep->currentHitPoints()<=0.f)
|| ep->currentChaScore1()<=0.f)
continue;
const CRootCell *const rootCell=ep->wpos().getRootCell();
@ -3921,7 +3921,7 @@ void CGrpProfileFaction::checkTargetsAround()
CPersistentOfPhysical const* const popAssisted = (*itAssisted);
CAIEntityPhysical* const epAssisted = popAssisted->getSpawnObj();
// If entity is not alive skip it
if (!epAssisted || !epAssisted->isAlive() || epAssisted->currentHitPoints()<=0.f)
if (!epAssisted || !epAssisted->isAlive() || epAssisted->currentChaScore1()<=0.f)
continue;
// If entity is not a friend skip it
if (!entityHavePartOfFactions(epAssisted, thisFriendFactions))
@ -3946,7 +3946,7 @@ void CGrpProfileFaction::checkTargetsAround()
const CPersistentOfPhysical *const popAssisted = (*itAssisted);
CAIEntityPhysical *const epAssisted = popAssisted->getSpawnObj();
// If entity is not alive skip it
if (!epAssisted || !epAssisted->isAlive() || epAssisted->currentHitPoints()<=0.f)
if (!epAssisted || !epAssisted->isAlive() || epAssisted->currentChaScore1()<=0.f)
continue;
// If entity is not a npc skip it
if (epAssisted->getRyzomType()!=RYZOMID::npc)
@ -3981,7 +3981,7 @@ void CGrpProfileFaction::checkTargetsAround()
CPersistentOfPhysical const* const popAttacked = (*itAttacked);
CAIEntityPhysical const* const epAttacked = popAttacked->getSpawnObj();
// If entity is not alive skip it
if (!epAttacked || !epAttacked->isAlive() || epAttacked->currentHitPoints()<=0.f)
if (!epAttacked || !epAttacked->isAlive() || epAttacked->currentChaScore1()<=0.f)
continue;
// If entity is not an ennemy skip it
if (!entityHavePartOfFactions(epAttacked, thisEnnemyFactions))
@ -4009,7 +4009,7 @@ void CGrpProfileFaction::checkTargetsAround()
CPersistentOfPhysical const* const popAttacked = (*itAttacked);
CAIEntityPhysical const* const epAttacked = popAttacked->getSpawnObj();
// If entity is not alive skip it
if (!epAttacked || !epAttacked->isAlive() || epAttacked->currentHitPoints()<=0.f)
if (!epAttacked || !epAttacked->isAlive() || epAttacked->currentChaScore1()<=0.f)
continue;
// If entity is not an ennemy skip it
if (!entityHavePartOfFactions(epAttacked, thisEnnemyFactions))

View file

@ -261,46 +261,46 @@ public:
//////////////////////////////////////////////////////////////////////////
// HP Less Filter
// ChaScore1 Less Filter
class CFightHPLessFilter
class CFightChaScore1LessFilter
:public CFightScriptComp
{
public:
CFightHPLessFilter(CFightScriptComp *customComp, float hpLimit)
CFightChaScore1LessFilter(CFightScriptComp *customComp, float ChaScore1Limit)
:_CustomComp(customComp)
,_HPLimit(hpLimit)
,_ChaScore1Limit(ChaScore1Limit)
{
nlassert(customComp); // comportment needed.
}
virtual ~CFightHPLessFilter()
virtual ~CFightChaScore1LessFilter()
{}
bool update (CSpawnBot &bot) const
{
if (bot.hpPercentage()>=_HPLimit)
if (bot.ChaScore1Percentage()>=_ChaScore1Limit)
return true;
return _CustomComp->update(bot);
}
string toString() const
{
return "HP%LESS("+NLMISC::toString(_HPLimit)+","+_CustomComp->toString()+")";
return "ChaScore1%LESS("+NLMISC::toString(_ChaScore1Limit)+","+_CustomComp->toString()+")";
}
protected:
private:
NLMISC::CSmartPtr<CFightScriptComp> _CustomComp;
float _HPLimit;
float _ChaScore1Limit;
};
class CFightHPLessFilterReader
class CFightChaScore1LessFilterReader
:public CFightScriptCompReader
{
public:
CFightHPLessFilterReader() {}
virtual ~CFightHPLessFilterReader() {}
CFightChaScore1LessFilterReader() {}
virtual ~CFightChaScore1LessFilterReader() {}
CFightScriptComp *create (const std::string &inStr) throw (ReadFightActionException)
{
@ -308,9 +308,9 @@ public:
explodeSubStrings(inStr, params, -1);
if (params.size()!=2)
throw ReadFightActionException("HP%LESS Needs 2 Params: <hp limit>,<ScriptComp>");
throw ReadFightActionException("ChaScore1%LESS Needs 2 Params: <ChaScore1 limit>,<ScriptComp>");
float hpLimit=(float)atof(params[0].c_str());
float ChaScore1Limit=(float)atof(params[0].c_str());
CSmartPtr<CFightScriptComp> scriptComp;
try
@ -321,56 +321,56 @@ public:
{
throw ReadFightActionException("cannot create sub ScriptComp : "+string(ex.what()));
}
return new CFightHPLessFilter(scriptComp, hpLimit);
return new CFightChaScore1LessFilter(scriptComp, ChaScore1Limit);
}
std::string getName () const
{
return std::string("HP%LESS");
return std::string("ChaScore1%LESS");
}
};
//////////////////////////////////////////////////////////////////////////
// HP More Filter
// ChaScore1 More Filter
class CFightHPMoreFilter
class CFightChaScore1MoreFilter
:public CFightScriptComp
{
public:
CFightHPMoreFilter(CFightScriptComp *customComp, float hpLimit)
CFightChaScore1MoreFilter(CFightScriptComp *customComp, float ChaScore1Limit)
:_CustomComp(customComp)
,_HPLimit(hpLimit)
,_ChaScore1Limit(ChaScore1Limit)
{
nlassert(customComp); // comportment needed.
}
virtual ~CFightHPMoreFilter()
virtual ~CFightChaScore1MoreFilter()
{}
bool update (CSpawnBot &bot) const
{
if (bot.hpPercentage()<=_HPLimit)
if (bot.ChaScore1Percentage()<=_ChaScore1Limit)
return true;
return _CustomComp->update(bot);
}
string toString() const
{
return "HP%MORE("+NLMISC::toString(_HPLimit)+","+_CustomComp->toString()+")";
return "ChaScore1%MORE("+NLMISC::toString(_ChaScore1Limit)+","+_CustomComp->toString()+")";
}
protected:
private:
NLMISC::CSmartPtr<CFightScriptComp> _CustomComp;
float _HPLimit;
float _ChaScore1Limit;
};
class CFightHPMoreFilterReader
class CFightChaScore1MoreFilterReader
:public CFightScriptCompReader
{
public:
CFightHPMoreFilterReader() {}
virtual ~CFightHPMoreFilterReader() {}
CFightChaScore1MoreFilterReader() {}
virtual ~CFightChaScore1MoreFilterReader() {}
CFightScriptComp *create (const std::string &inStr) throw (ReadFightActionException)
{
@ -378,9 +378,9 @@ public:
explodeSubStrings(inStr, params, -1);
if (params.size()!=2)
throw ReadFightActionException("HP%MORE Needs 2 Params: <hp limit>,<ScriptComp>");
throw ReadFightActionException("ChaScore1%MORE Needs 2 Params: <ChaScore1 limit>,<ScriptComp>");
float hpLimit=(float)atof(params[0].c_str());
float ChaScore1Limit=(float)atof(params[0].c_str());
CSmartPtr<CFightScriptComp> scriptComp;
try
@ -391,11 +391,11 @@ public:
{
throw ReadFightActionException("cannot create sub ScriptComp : "+string(ex.what()));
}
return new CFightHPMoreFilter(scriptComp, hpLimit);
return new CFightChaScore1MoreFilter(scriptComp, ChaScore1Limit);
}
std::string getName () const
{
return std::string("HP%MORE");
return std::string("ChaScore1%MORE");
}
};
@ -1045,8 +1045,8 @@ CFightScript::CFightScript()
add(new CFightOnceReader());
add(new CFightTimedFilterReader());
add(new CFightRandomFilterReader());
add(new CFightHPLessFilterReader());
add(new CFightHPMoreFilterReader());
add(new CFightChaScore1LessFilterReader());
add(new CFightChaScore1MoreFilterReader());
add(new CFightAggroBlockReader());
add(new CFightAggroChangeReader());

View file

@ -610,7 +610,7 @@ void CGrpProfileDynHarvest::checkTargetsAround ()
const CAIEntityPhysical*const ep = player->getSpawnObj();
if ( !ep
|| !ep->isAlive()
|| ep->currentHitPoints()<=0.f )
|| ep->currentChaScore1()<=0.f )
continue;
const CRootCell *const rootCell=ep->wpos().getRootCell();

View file

@ -698,8 +698,8 @@ void CMessages::init()
TRANSPORT_CLASS_REGISTER (CReportAIInstanceDespawnMsg);
TRANSPORT_CLASS_REGISTER (CWarnBadInstanceMsgImp);
TRANSPORT_CLASS_REGISTER (CCreatureSetUrlMsg);
TRANSPORT_CLASS_REGISTER (CChangeCreatureMaxHPMsg)
TRANSPORT_CLASS_REGISTER (CChangeCreatureHPMsg);
TRANSPORT_CLASS_REGISTER (CChangeCreatureMaxChaScore1Msg)
TRANSPORT_CLASS_REGISTER (CChangeCreatureChaScore1Msg);
TRANSPORT_CLASS_REGISTER (CChangeCreatureModeMsgImp);
TRANSPORT_CLASS_REGISTER (CQueryEgs);

View file

@ -52,8 +52,8 @@ uint32 *IsolatedSheetServer = NULL;
TDataSetRow *IsolatedTarget = NULL; // sint32
uint32 *IsolatedMode = NULL; // only mode enum
uint32 *IsolatedBehaviour = NULL;
uint32 *IsolatedCurrentHitPoints = NULL;
uint32 *IsolatedMaxHitPoints = NULL;
uint32 *IsolatedCurrentChaScore1 = NULL;
uint32 *IsolatedMaxChaScore1 = NULL;
uint32 *IsolatedBestRoleLevel = NULL;
uint8 *IsolatedCombatState = NULL;
@ -122,10 +122,10 @@ void CMirrors::initMirror()
DataSet->declareProperty( "Mode", PSOReadWrite | PSONotifyChanges );
DataSet->declareProperty( "Behaviour", PSOReadWrite | PSONotifyChanges );
DataSet->declareProperty( "Target", PSOReadWrite | PSONotifyChanges );
DataSet->declareProperty( "CurrentHitPoints", PSOReadOnly );
DataSet->declareProperty( "CurrentChaScore1", PSOReadOnly );
DataSet->declareProperty( "CurrentRunSpeed", PSOReadOnly );
DataSet->declareProperty( "CurrentWalkSpeed", PSOReadOnly );
DataSet->declareProperty( "MaxHitPoints", PSOReadOnly );
DataSet->declareProperty( "MaxChaScore1", PSOReadOnly );
DataSet->declareProperty( "BestRoleLevel", PSOReadOnly );
DataSet->declareProperty( "CombatState", PSOReadOnly );
DataSet->declareProperty( "TeamId", PSOReadOnly | PSONotifyChanges );

View file

@ -1494,65 +1494,65 @@ void setAutoSpawn_f_(CStateInstance* entity, CScriptStack& stack)
}
//----------------------------------------------------------------------------
// HP related methods
// ChaScore1 related methods
/** @page code
@subsection setMaxHP_ff_
Sets the Max HP level of each bot of the group.
@subsection setMaxChaScore1_ff_
Sets the Max ChaScore1 level of each bot of the group.
Arguments: f(MaxHp) f(SetFull) ->
@param[in] MaxHP is the new maximum HP for each bot
@param[in] SetFull if not 0, will set the HP to the new maximum
Arguments: f(MaxChaScore1) f(SetFull) ->
@param[in] MaxChaScore1 is the new maximum ChaScore1 for each bot
@param[in] SetFull if not 0, will set the ChaScore1 to the new maximum
@code
()setMaxHP(50000,1);
()setMaxChaScore1(50000,1);
@endcode
*/
// CGroup
void setMaxHP_ff_(CStateInstance* entity, CScriptStack& stack)
void setMaxChaScore1_ff_(CStateInstance* entity, CScriptStack& stack)
{
bool setFull = ((float)stack.top() != 0.f); stack.pop();
float maxHp = ((float)stack.top()); stack.pop();
float maxChaScore1 = ((float)stack.top()); stack.pop();
CChangeCreatureMaxHPMsg& msgList = CAIS::instance().getCreatureChangeMaxHP();
CChangeCreatureMaxChaScore1Msg& msgList = CAIS::instance().getCreatureChangeMaxChaScore1();
FOREACH(bot, CCont<CBot>, entity->getGroup()->bots())
{
if (!bot->isSpawned())
continue;
if (maxHp > 0)
if (maxChaScore1 > 0)
{
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.MaxHp.push_back((uint32)(maxHp));
msgList.MaxChaScore1.push_back((uint32)(maxChaScore1));
msgList.SetFull.push_back((uint8)(setFull?1:0));
}
bot->setCustomMaxHp((uint32)maxHp);
bot->setCustomMaxChaScore1((uint32)maxChaScore1);
}
}
/** @page code
@subsection setHPLevel_f_
Sets the current HP level of each bot of the group.
@subsection setChaScore1Level_f_
Sets the current ChaScore1 level of each bot of the group.
Arguments: f(Coef) ->
@param[in] Coef is the percentage of its max HP each creature will have
@param[in] Coef is the percentage of its max ChaScore1 each creature will have
@code
()setHPLevel(0.8);
()setChaScore1Level(0.8);
@endcode
*/
// CGroup
void setHPLevel_f_(CStateInstance* entity, CScriptStack& stack)
void setChaScore1Level_f_(CStateInstance* entity, CScriptStack& stack)
{
float coef = stack.top();
stack.pop();
CChangeCreatureHPMsg& msgList = CAIS::instance().getCreatureChangeHP();
CChangeCreatureChaScore1Msg& msgList = CAIS::instance().getCreatureChangeChaScore1();
FOREACH(bot, CCont<CBot>, entity->getGroup()->bots())
{
@ -1562,7 +1562,7 @@ void setHPLevel_f_(CStateInstance* entity, CScriptStack& stack)
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.DeltaHp.push_back((sint32)(sbot->maxHitPoints()*coef));
msgList.DeltaChaScore1.push_back((sint32)(sbot->maxChaScore1()*coef));
}
}
@ -1570,34 +1570,34 @@ void setHPLevel_f_(CStateInstance* entity, CScriptStack& stack)
//----------------------------------------------------------------------------
// HP related methods
// ChaScore1 related methods
/** @page code
@subsection setHPScale_f__f_
Sets the current HP level of level of each bot of the group. its maxHitPoints
@subsection setChaScore1Scale_f__f_
Sets the current ChaScore1 level of level of each bot of the group. its maxChaScore1
eg:
for a bot HP = 850 and MaxHP = 1000
()setHPScale_f_(0); HP will be 0 so DeltaHp = 850
()setHPScale_f_(1); HP will be 100 so DeltaHp = 150
()setHPScale_f_(0.5); HP will be 500 so DeltaHp = 350
if bot HP = 840 and Max abd setHpRatio(0) HP will be 0
for a bot ChaScore1 = 850 and MaxChaScore1 = 1000
()setChaScore1Scale_f_(0); ChaScore1 will be 0 so DeltaChaScore1 = 850
()setChaScore1Scale_f_(1); ChaScore1 will be 100 so DeltaChaScore1 = 150
()setChaScore1Scale_f_(0.5); ChaScore1 will be 500 so DeltaChaScore1 = 350
if bot ChaScore1 = 840 and Max abd setChaScore1Ratio(0) ChaScore1 will be 0
Arguments: f(Coef) ->
@param[in] Coef is the percentage of its max HP each creature will *BE*
@param[in] Coef is the percentage of its max ChaScore1 each creature will *BE*
@code
()setHPLevel(0.8);
()setChaScore1Level(0.8);
@endcode
*/
// CGroup
void setHPScale_f_(CStateInstance* entity, CScriptStack& stack)
void setChaScore1Scale_f_(CStateInstance* entity, CScriptStack& stack)
{
float coef = stack.top();
stack.pop();
CChangeCreatureHPMsg& msgList = CAIS::instance().getCreatureChangeHP();
CChangeCreatureChaScore1Msg& msgList = CAIS::instance().getCreatureChangeChaScore1();
FOREACH(bot, CCont<CBot>, entity->getGroup()->bots())
{
@ -1607,7 +1607,7 @@ void setHPScale_f_(CStateInstance* entity, CScriptStack& stack)
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.DeltaHp.push_back((sint32)( sbot->maxHitPoints() *coef - sbot->currentHitPoints()) );
msgList.DeltaChaScore1.push_back((sint32)( sbot->maxChaScore1() *coef - sbot->currentChaScore1()) );
}
}
@ -1623,7 +1623,7 @@ Arguments: s(actionName),s(url) ->
@param[in] url of action when player mouse over
@code
()setUrl("Click on Me", "http://www.domain.com/script.php");
()setUrl("Click on Me", "http://www.domain.com/script.pChaScore1");
@endcode
*/
@ -1652,24 +1652,24 @@ void setUrl_ss_(CStateInstance* entity, CScriptStack& stack)
/** @page code
@subsection scaleHP_f_
Scales the bots HP.
@subsection scaleChaScore1_f_
Scales the bots ChaScore1.
Arguments: f(Coef) ->
@param[in] Coef is the percentage of its current HP each creature will have
@param[in] Coef is the percentage of its current ChaScore1 each creature will have
@code
()scaleHP(2);
()scaleChaScore1(2);
@endcode
*/
// CGroup
void scaleHP_f_(CStateInstance* entity, CScriptStack& stack)
void scaleChaScore1_f_(CStateInstance* entity, CScriptStack& stack)
{
float coef = stack.top();
stack.pop();
CChangeCreatureHPMsg& msgList = CAIS::instance().getCreatureChangeHP();
CChangeCreatureChaScore1Msg& msgList = CAIS::instance().getCreatureChangeChaScore1();
FOREACH(bot, CCont<CBot>, entity->getGroup()->bots())
{
@ -1679,34 +1679,34 @@ void scaleHP_f_(CStateInstance* entity, CScriptStack& stack)
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.DeltaHp.push_back((sint32)(sbot->currentHitPoints()*coef));
msgList.DeltaChaScore1.push_back((sint32)(sbot->currentChaScore1()*coef));
}
}
/** @page code
@subsection setBotHPScaleByAlias_fs_
Same as setHpSacale but only on a specific bot of a groupe from the current group by its bot alias
@subsection setBotChaScore1ScaleByAlias_fs_
Same as setChaScore1Sacale but only on a specific bot of a groupe from the current group by its bot alias
Arguments: f(alias),f(Coef), ->
@param[in] alias is the alias of the bot
@param[in] Coef is the percentage of its current HP each creature will have
@param[in] Coef is the percentage of its current ChaScore1 each creature will have
@code
()scaleHpByAlias(2, '(A:1000:10560)');
()scaleChaScore1ByAlias(2, '(A:1000:10560)');
@endcode
*/
// CGroup
void setBotHPScaleByAlias_fs_(CStateInstance* entity, CScriptStack& stack)
void setBotChaScore1ScaleByAlias_fs_(CStateInstance* entity, CScriptStack& stack)
{
uint32 alias = LigoConfig.aliasFromString((string)stack.top()) ; stack.pop();
float coef = stack.top(); stack.pop();
CChangeCreatureHPMsg& msgList = CAIS::instance().getCreatureChangeHP();
CChangeCreatureChaScore1Msg& msgList = CAIS::instance().getCreatureChangeChaScore1();
FOREACH(bot, CCont<CBot>, entity->getGroup()->bots())
{
@ -1717,31 +1717,31 @@ void setBotHPScaleByAlias_fs_(CStateInstance* entity, CScriptStack& stack)
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.DeltaHp.push_back((sint32)( sbot->maxHitPoints() *coef - sbot->currentHitPoints()) );
msgList.DeltaChaScore1.push_back((sint32)( sbot->maxChaScore1() *coef - sbot->currentChaScore1()) );
}
}
/** @page code
@subsection downScaleHP_f_
Scales the bots HP down.
@subsection downScaleChaScore1_f_
Scales the bots ChaScore1 down.
Arguments: f(Coef) ->
@param[in] Coef is a value
@code
()downScaleHP(2);
()downScaleChaScore1(2);
@endcode
*/
// CGroup
void downScaleHP_f_(CStateInstance* entity, CScriptStack& stack)
void downScaleChaScore1_f_(CStateInstance* entity, CScriptStack& stack)
{
float coef = stack.top();
stack.pop();
CChangeCreatureHPMsg& msgList = CAIS::instance().getCreatureChangeHP();
CChangeCreatureChaScore1Msg& msgList = CAIS::instance().getCreatureChangeChaScore1();
clamp(coef, 0.f, 1.f);
FOREACH(bot, CCont<CBot>, entity->getGroup()->bots())
@ -1752,30 +1752,30 @@ void downScaleHP_f_(CStateInstance* entity, CScriptStack& stack)
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.DeltaHp.push_back((sint32)(sbot->currentHitPoints()*(coef-1)));
msgList.DeltaChaScore1.push_back((sint32)(sbot->currentChaScore1()*(coef-1)));
}
}
/** @page code
@subsection upScaleHP_f_
Scales the bots HP up.
@subsection upScaleChaScore1_f_
Scales the bots ChaScore1 up.
Arguments: f(Coef) ->
@param[in] Coef is a value
@code
()upScaleHP(2);
()upScaleChaScore1(2);
@endcode
*/
// CGroup
void upScaleHP_f_(CStateInstance* entity, CScriptStack& stack)
void upScaleChaScore1_f_(CStateInstance* entity, CScriptStack& stack)
{
float coef = stack.top();
stack.pop();
CChangeCreatureHPMsg& msgList = CAIS::instance().getCreatureChangeHP();
CChangeCreatureChaScore1Msg& msgList = CAIS::instance().getCreatureChangeChaScore1();
clamp(coef, 0.f, 1.f);
FOREACH(bot, CCont<CBot>, entity->getGroup()->bots())
@ -1786,31 +1786,31 @@ void upScaleHP_f_(CStateInstance* entity, CScriptStack& stack)
if (spBot)
{
msgList.Entities.push_back(spBot->dataSetRow());
msgList.DeltaHp.push_back((sint32)((spBot->maxHitPoints()-spBot->currentHitPoints())*coef));
msgList.DeltaChaScore1.push_back((sint32)((spBot->maxChaScore1()-spBot->currentChaScore1())*coef));
}
}
}
/** @page code
@subsection addHP_f_
Add HP to the bots.
@subsection addChaScore1_f_
Add ChaScore1 to the bots.
Arguments: f(HP) ->
@param[in] HP is the amount of hit points to add to each bot
Arguments: f(ChaScore1) ->
@param[in] ChaScore1 is the amount of ChaScore1 to add to each bot
@code
()addHP(500);
()addChaScore1(500);
@endcode
*/
// CGroup
void addHP_f_(CStateInstance* entity, CScriptStack& stack)
void addChaScore1_f_(CStateInstance* entity, CScriptStack& stack)
{
float addHP = stack.top();
float addChaScore1 = stack.top();
stack.pop();
CChangeCreatureHPMsg& msgList = CAIS::instance().getCreatureChangeHP();
CChangeCreatureChaScore1Msg& msgList = CAIS::instance().getCreatureChangeChaScore1();
FOREACH(bot, CCont<CBot>, entity->getGroup()->bots())
{
@ -1820,7 +1820,7 @@ void addHP_f_(CStateInstance* entity, CScriptStack& stack)
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.DeltaHp.push_back((sint32)(sbot->currentHitPoints()+addHP));
msgList.DeltaChaScore1.push_back((sint32)(sbot->currentChaScore1()+addChaScore1));
}
}
@ -2335,21 +2335,21 @@ Get some player stat.
A player EntityId is used to identify the player. This EntityId is passed as string as argument. The EntityId can be obtains via getCurrentPlayerAggroListTarget or getRandomPlayerAggroListTarget.
The player must be in the same AI Instance (same continent).
If the player is not in the same Ai Instance or the input string is empty the function return zero and *display* a warning message on the log. You can think of using isPlayerAlived to be sure that the id is still a valid value.
If param is not one of "HP", "MaxHp", "RatioHp" zero is return and a warning message is printed on the log.
- The "Hp" stat is the property CURRENT_HIT_POINTS as seen in the mirror.
- The "MaxHp" stat is the property MAX_HIT_POINTS as seen in the mirror.
- The "RatioHp" stat is (Hp * 100) / MaxHp
If param is not one of "ChaScore1", "MaxChaScore1", "RatioChaScore1" zero is return and a warning message is printed on the log.
- The "ChaScore1" stat is the property CURRENT_ChaScore1 as seen in the mirror.
- The "MaxChaScore1" stat is the property MAX_ChaScore1 as seen in the mirror.
- The "RatioChaScore1" stat is (ChaScore1 * 100) / MaxChaScore1
Be careful the argument is case sensitive.
Arguments: s(playerEidAsString), s(statName) -> s(result)
@param[in] playerEidAsString is EntityId as string from the player we want infos
@param[in] statName is the name of the property (can be "HP", "MaxHp", "RatioHp")
@param[in] statName is the name of the property (can be "ChaScore1", "MaxChaScore1", "RatioChaScore1")
@param[out] value is a the value of the parameter
@code
($playerEid)getCurrentPlayerEid();
print($playerEid); //log (0x00001fbd50:00:00:81)
(maxHp)getPlayerStat($playerEid, "MaxHp");
(maxChaScore1)getPlayerStat($playerEid, "MaxChaScore1");
@endcode
*/
void getPlayerStat_ss_f(CStateInstance* entity, CScriptStack& stack)
@ -2371,25 +2371,25 @@ void getPlayerStat_ss_f(CStateInstance* entity, CScriptStack& stack)
return;
}
if (statName == "Hp" )
if (statName == "ChaScore1" )
{
// return DSPropertyCURRENT_HIT_POINTS Mirror value
CMirrorPropValue<sint32> mirrorSymbol( TheDataset, playerRow, DSPropertyCURRENT_HIT_POINTS );
// return DSPropertyCURRENT_ChaScore1 Mirror value
CMirrorPropValue<sint32> mirrorSymbol( TheDataset, playerRow, DSPropertyCURRENT_ChaScore1 );
stack.push((float)mirrorSymbol.getValue());
return;
}
else if (statName == "MaxHp")
else if (statName == "MaxChaScore1")
{
// return DSPropertyMAX_HIT_POINTS Mirror value
CMirrorPropValue<sint32> mirrorSymbol( TheDataset, playerRow, DSPropertyMAX_HIT_POINTS );
// return DSPropertyMAX_ChaScore1 Mirror value
CMirrorPropValue<sint32> mirrorSymbol( TheDataset, playerRow, DSPropertyMAX_ChaScore1 );
stack.push((float)mirrorSymbol.getValue());
return;
}
else if (statName == "RatioHp")
else if (statName == "RatioChaScore1")
{
// return percentage of live (read from mirror values)
CMirrorPropValue<sint32> mirrorSymbol( TheDataset, playerRow, DSPropertyCURRENT_HIT_POINTS );
CMirrorPropValue<sint32> mirrorSymbol2( TheDataset, playerRow, DSPropertyMAX_HIT_POINTS );
CMirrorPropValue<sint32> mirrorSymbol( TheDataset, playerRow, DSPropertyCURRENT_ChaScore1 );
CMirrorPropValue<sint32> mirrorSymbol2( TheDataset, playerRow, DSPropertyMAX_ChaScore1 );
stack.push((float)(100.0*mirrorSymbol.getValue() / mirrorSymbol2.getValue()));
return;
@ -3942,18 +3942,18 @@ Answer is asynchronous so we have to indicates a group and a user event that wil
Possible info to know are
- Name
- Hp
- MaxHp
- RatioHp
- Sap
- MaxSap
- RatioSap
- Focus
- MaxFocus
- RatioFocus
- Stamina
- MaxStamina
- RatioStamina
- ChaScore1
- MaxChaScore1
- RatioChaScore1
- ChaScore3
- MaxChaScore3
- RatioChaScore3
- ChaScore4
- MaxChaScore4
- RatioChaScore4
- ChaScore2
- MaxChaScore2
- RatioChaScore2
Arguments: s(botIndex), s(query), c(groupThatWillBeTriggered), f(idOfTheUserEvent), s(msgId)
@ -3969,18 +3969,18 @@ Answer will be given by the getParam
//Sening msg to EGS
(@groupToNotify)boss_group.context();
()queryEgs("Name", $playerEid, @groupToNotify, 4, "MSG_NAME");
()queryEgs("Hp", $playerEid, @groupToNotify, 4, "msg1");
()queryEgs("MaxHp", $playerEid, @groupToNotify, 4, "msg2");
()queryEgs("RatioHp", $playerEid, @groupToNotify, 4, "msg3");
()queryEgs("Sap", $playerEid, @groupToNotify, 4, "msg4");
()queryEgs("MaxSap", $playerEid, @groupToNotify, 4, "msg5");
()queryEgs("RatioSap", $playerEid, @groupToNotify, 4, "msg6");
()queryEgs("Focus", $playerEid, @groupToNotify, 4, "msg7");
()queryEgs("MaxFocus", $playerEid, @groupToNotify, 4, "msg8");
()queryEgs("RatioFocus", $playerEid, @groupToNotify, 4, "msg9");
()queryEgs("Stamina", $playerEid, @groupToNotify, 4, "msg10");
()queryEgs("MaxStamina", $playerEid, @groupToNotify, 4, "msg11");
()queryEgs("RatioStamina", $playerEid, @groupToNotify, 4, "msg12");
()queryEgs("ChaScore1", $playerEid, @groupToNotify, 4, "msg1");
()queryEgs("MaxChaScore1", $playerEid, @groupToNotify, 4, "msg2");
()queryEgs("RatioChaScore1", $playerEid, @groupToNotify, 4, "msg3");
()queryEgs("ChaScore3", $playerEid, @groupToNotify, 4, "msg4");
()queryEgs("MaxChaScore3", $playerEid, @groupToNotify, 4, "msg5");
()queryEgs("RatioChaScore3", $playerEid, @groupToNotify, 4, "msg6");
()queryEgs("ChaScore4", $playerEid, @groupToNotify, 4, "msg7");
()queryEgs("MaxChaScore4", $playerEid, @groupToNotify, 4, "msg8");
()queryEgs("RatioChaScore4", $playerEid, @groupToNotify, 4, "msg9");
()queryEgs("ChaScore2", $playerEid, @groupToNotify, 4, "msg10");
()queryEgs("MaxChaScore2", $playerEid, @groupToNotify, 4, "msg11");
()queryEgs("RatioChaScore2", $playerEid, @groupToNotify, 4, "msg12");
()queryEgs("BestSkillLevel", $playerEid, @groupToNotify, 4, "msg13");
@endcode
Answer of the EGS
@ -4783,14 +4783,14 @@ std::map<std::string, FScrptNativeFunc> nfGetGroupNativeFunctions()
REGISTER_NATIVE_FUNC(functions, clearAggroList__);
REGISTER_NATIVE_FUNC(functions, setMode_s_);
REGISTER_NATIVE_FUNC(functions, setAutoSpawn_f_);
REGISTER_NATIVE_FUNC(functions, setMaxHP_ff_);
REGISTER_NATIVE_FUNC(functions, setHPLevel_f_);
REGISTER_NATIVE_FUNC(functions, setHPScale_f_);
REGISTER_NATIVE_FUNC(functions, scaleHP_f_);
REGISTER_NATIVE_FUNC(functions, setBotHPScaleByAlias_fs_);
REGISTER_NATIVE_FUNC(functions, downScaleHP_f_);
REGISTER_NATIVE_FUNC(functions, upScaleHP_f_);
REGISTER_NATIVE_FUNC(functions, addHP_f_);
REGISTER_NATIVE_FUNC(functions, setMaxChaScore1_ff_);
REGISTER_NATIVE_FUNC(functions, setChaScore1Level_f_);
REGISTER_NATIVE_FUNC(functions, setChaScore1Scale_f_);
REGISTER_NATIVE_FUNC(functions, scaleChaScore1_f_);
REGISTER_NATIVE_FUNC(functions, setBotChaScore1ScaleByAlias_fs_);
REGISTER_NATIVE_FUNC(functions, downScaleChaScore1_f_);
REGISTER_NATIVE_FUNC(functions, upScaleChaScore1_f_);
REGISTER_NATIVE_FUNC(functions, addChaScore1_f_);
REGISTER_NATIVE_FUNC(functions, aiAction_s_);
REGISTER_NATIVE_FUNC(functions, aiActionSelf_s_);
REGISTER_NATIVE_FUNC(functions, addProfileParameter_s_);

View file

@ -1037,22 +1037,22 @@ void setRespawnTime_f_(CStateInstance* entity, CScriptStack& stack)
//----------------------------------------------------------------------------
/** @page code
@subsection addHpUpTrigger_ff_
Registers a trigger on HP increases. Whenever the HP level of a bot upcross
@subsection addChaScore1UpTrigger_ff_
Registers a trigger on ChaScore1 increases. Whenever the ChaScore1 level of a bot upcross
the threshold it triggers the specified user event. Several triggers can be
registered on the same group, even with the same threshold and event.
Arguments: f(threshold),f(user_event_n) ->
@param[in] threshold is a HP threshold
@param[in] threshold is a ChaScore1 threshold
@param[in] user_event_n is the user event to trigger
@code
()addHpUpTrigger(0.5, 4);
()addChaScore1UpTrigger(0.5, 4);
@endcode
*/
// CGroupNpc
void addHpUpTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
void addChaScore1UpTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
{
int eventId = (int)(float)stack.top();
stack.pop();
@ -1061,31 +1061,31 @@ void addHpUpTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
CGroupNpc* const grpNpc = dynamic_cast<CGroupNpc*>(entity->getGroup());
if (!grpNpc)
{
nlwarning("Trying to add a hp up trigger (%f) listener (user event %d) in a group which is not an NPC group.", threshold, eventId);
nlwarning("Trying to add a ChaScore1 up trigger (%f) listener (user event %d) in a group which is not an NPC group.", threshold, eventId);
return;
}
grpNpc->addHpUpTrigger(threshold, eventId);
grpNpc->addChaScore1UpTrigger(threshold, eventId);
}
//----------------------------------------------------------------------------
/** @page code
@subsection delHpUpTrigger_ff_
Unregisters a trigger on HP increases. The same values used when registering
@subsection delChaScore1UpTrigger_ff_
Unregisters a trigger on ChaScore1 increases. The same values used when registering
the trigger must be passed. If several triggers were defined with the same
parameters only one is removed.
Arguments: f(threshold),f(user_event_n) ->
@param[in] threshold is a HP threshold
@param[in] threshold is a ChaScore1 threshold
@param[in] user_event_n is the user event to trigger
@code
()delHpUpTrigger(0.5, 4);
()delChaScore1UpTrigger(0.5, 4);
@endcode
*/
// CGroupNpc
void delHpUpTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
void delChaScore1UpTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
{
int eventId = (int)(float)stack.top();
stack.pop();
@ -1094,31 +1094,31 @@ void delHpUpTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
CGroupNpc* const grpNpc = dynamic_cast<CGroupNpc*>(entity->getGroup());
if (!grpNpc)
{
nlwarning("Trying to delete a hp up trigger (%f) listener (user event %d) in a group which is not an NPC group.", threshold, eventId);
nlwarning("Trying to delete a ChaScore1 up trigger (%f) listener (user event %d) in a group which is not an NPC group.", threshold, eventId);
return;
}
grpNpc->delHpUpTrigger(threshold, eventId);
grpNpc->delChaScore1UpTrigger(threshold, eventId);
}
//----------------------------------------------------------------------------
/** @page code
@subsection addHpDownTrigger_ff_
Registers a trigger on HP decreases. Whenever the HP level of a bot downcross
@subsection addChaScore1DownTrigger_ff_
Registers a trigger on ChaScore1 decreases. Whenever the ChaScore1 level of a bot downcross
the threshold it triggers the specified user event. Several triggers can be
registered on the same group, even with the same threshold and event.
Arguments: f(threshold),f(user_event_n) ->
@param[in] threshold is a HP threshold
@param[in] threshold is a ChaScore1 threshold
@param[in] user_event_n is the user event to trigger
@code
()addHpDownTrigger(0.5, 5);
()addChaScore1DownTrigger(0.5, 5);
@endcode
*/
// CGroupNpc
void addHpDownTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
void addChaScore1DownTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
{
int eventId = (int)(float)stack.top();
stack.pop();
@ -1127,31 +1127,31 @@ void addHpDownTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
CGroupNpc* const grpNpc = dynamic_cast<CGroupNpc*>(entity->getGroup());
if (!grpNpc)
{
nlwarning("Trying to add a hp down trigger (%f) listener (user event %d) in a group which is not an NPC group.", threshold, eventId);
nlwarning("Trying to add a ChaScore1 down trigger (%f) listener (user event %d) in a group which is not an NPC group.", threshold, eventId);
return;
}
grpNpc->addHpDownTrigger(threshold, eventId);
grpNpc->addChaScore1DownTrigger(threshold, eventId);
}
//----------------------------------------------------------------------------
/** @page code
@subsection delHpDownTrigger_ff_
Unregisters a trigger on HP decreases. The same values used when registering
@subsection delChaScore1DownTrigger_ff_
Unregisters a trigger on ChaScore1 decreases. The same values used when registering
the trigger must be passed. If several triggers were defined with the same
parameters only one is removed.
Arguments: f(threshold),f(user_event_n) ->
@param[in] threshold is a HP threshold
@param[in] threshold is a ChaScore1 threshold
@param[in] user_event_n is the user event to trigger
@code
()delHpDownTrigger(0.5, 5);
()delChaScore1DownTrigger(0.5, 5);
@endcode
*/
// CGroupNpc
void delHpDownTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
void delChaScore1DownTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
{
int eventId = (int)(float)stack.top();
stack.pop();
@ -1160,31 +1160,31 @@ void delHpDownTrigger_ff_(CStateInstance* entity, CScriptStack& stack)
CGroupNpc* const grpNpc = dynamic_cast<CGroupNpc*>(entity->getGroup());
if (!grpNpc)
{
nlwarning("Trying to delete a hp down trigger (%f) listener (user event %d) in a group which is not an NPC group.", threshold, eventId);
nlwarning("Trying to delete a ChaScore1 down trigger (%f) listener (user event %d) in a group which is not an NPC group.", threshold, eventId);
return;
}
grpNpc->delHpDownTrigger(threshold, eventId);
grpNpc->delChaScore1DownTrigger(threshold, eventId);
}
//----------------------------------------------------------------------------
/** @page code
@subsection addHpUpTrigger_fs_
@sa @ref addHpUpTrigger_ff_
@subsection addChaScore1UpTrigger_fs_
@sa @ref addChaScore1UpTrigger_ff_
These triggers call a script function instead of trigger a user event.
Arguments: f(threshold),s(callback) ->
@param[in] threshold is a HP threshold
@param[in] threshold is a ChaScore1 threshold
@param[in] callback is the script callback to trigger
@code
()addHpUpTrigger(0.5, "onHPIncrease");
()addChaScore1UpTrigger(0.5, "onChaScore1Increase");
@endcode
*/
// CGroupNpc
void addHpUpTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
void addChaScore1UpTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
{
std::string cbFunc = (std::string)stack.top();
stack.pop();
@ -1193,31 +1193,31 @@ void addHpUpTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
CGroupNpc* const grpNpc = dynamic_cast<CGroupNpc*>(entity->getGroup());
if (!grpNpc)
{
nlwarning("Trying to add a hp up trigger (%f) listener (%s) in a group which is not an NPC group.", threshold, cbFunc.c_str());
nlwarning("Trying to add a ChaScore1 up trigger (%f) listener (%s) in a group which is not an NPC group.", threshold, cbFunc.c_str());
return;
}
grpNpc->addHpUpTrigger(threshold, cbFunc);
grpNpc->addChaScore1UpTrigger(threshold, cbFunc);
}
//----------------------------------------------------------------------------
/** @page code
@subsection delHpUpTrigger_fs_
@sa @ref delHpUpTrigger_ff_
@subsection delChaScore1UpTrigger_fs_
@sa @ref delChaScore1UpTrigger_ff_
This function is used to remove script function triggers.
Arguments: f(threshold),s(callback) ->
@param[in] threshold is a HP threshold
@param[in] threshold is a ChaScore1 threshold
@param[in] callback is the script callback to trigger
@code
()delHpUpTrigger(0.5, "onHPIncrease");
()delChaScore1UpTrigger(0.5, "onChaScore1Increase");
@endcode
*/
// CGroupNpc
void delHpUpTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
void delChaScore1UpTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
{
std::string cbFunc = (std::string)stack.top();
stack.pop();
@ -1226,31 +1226,31 @@ void delHpUpTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
CGroupNpc* const grpNpc = dynamic_cast<CGroupNpc*>(entity->getGroup());
if (!grpNpc)
{
nlwarning("Trying to delete a hp up trigger (%f) listener (%s) in a group which is not an NPC group.", threshold, cbFunc.c_str());
nlwarning("Trying to delete a ChaScore1 up trigger (%f) listener (%s) in a group which is not an NPC group.", threshold, cbFunc.c_str());
return;
}
grpNpc->delHpUpTrigger(threshold, cbFunc);
grpNpc->delChaScore1UpTrigger(threshold, cbFunc);
}
//----------------------------------------------------------------------------
/** @page code
@subsection addHpDownTrigger_fs_
@sa @ref addHpDownTrigger_ff_
@subsection addChaScore1DownTrigger_fs_
@sa @ref addChaScore1DownTrigger_ff_
These triggers call a script function instead of trigger a user event.
Arguments: f(threshold),s(callback) ->
@param[in] threshold is a HP threshold
@param[in] threshold is a ChaScore1 threshold
@param[in] callback is the script callback to trigger
@code
()addHpDownTrigger(0.5, "onHPDecrease");
()addChaScore1DownTrigger(0.5, "onChaScore1Decrease");
@endcode
*/
// CGroupNpc
void addHpDownTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
void addChaScore1DownTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
{
std::string cbFunc = (std::string)stack.top();
stack.pop();
@ -1259,31 +1259,31 @@ void addHpDownTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
CGroupNpc* const grpNpc = dynamic_cast<CGroupNpc*>(entity->getGroup());
if (!grpNpc)
{
nlwarning("Trying to add a hp down trigger (%f) listener (%s) in a group which is not an NPC group.", threshold, cbFunc.c_str());
nlwarning("Trying to add a ChaScore1 down trigger (%f) listener (%s) in a group which is not an NPC group.", threshold, cbFunc.c_str());
return;
}
grpNpc->addHpDownTrigger(threshold, cbFunc);
grpNpc->addChaScore1DownTrigger(threshold, cbFunc);
}
//----------------------------------------------------------------------------
/** @page code
@subsection delHpDownTrigger_fs_
@sa @ref delHpDownTrigger_ff_
@subsection delChaScore1DownTrigger_fs_
@sa @ref delChaScore1DownTrigger_ff_
This function is used to remove script function triggers.
Arguments: f(threshold),s(callback) ->
@param[in] threshold is a HP threshold
@param[in] threshold is a ChaScore1 threshold
@param[in] callback is the script callback to trigger
@code
()delHpDownTrigger(0.5, "onHPDecrease");
()delChaScore1DownTrigger(0.5, "onChaScore1Decrease");
@endcode
*/
// CGroupNpc
void delHpDownTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
void delChaScore1DownTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
{
std::string cbFunc = (std::string)stack.top();
stack.pop();
@ -1292,10 +1292,10 @@ void delHpDownTrigger_fs_(CStateInstance* entity, CScriptStack& stack)
CGroupNpc* const grpNpc = dynamic_cast<CGroupNpc*>(entity->getGroup());
if (!grpNpc)
{
nlwarning("Trying to delete a hp down trigger (%f) listener (%s) in a group which is not an NPC group.", threshold, cbFunc.c_str());
nlwarning("Trying to delete a ChaScore1 down trigger (%f) listener (%s) in a group which is not an NPC group.", threshold, cbFunc.c_str());
return;
}
grpNpc->delHpDownTrigger(threshold, cbFunc);
grpNpc->delChaScore1DownTrigger(threshold, cbFunc);
}
//----------------------------------------------------------------------------
@ -2752,14 +2752,14 @@ std::map<std::string, FScrptNativeFunc> nfGetNpcGroupNativeFunctions()
REGISTER_NATIVE_FUNC(functions, ignoreOffensiveActions_f_);
REGISTER_NATIVE_FUNC(functions, setDespawnTime_f_);
REGISTER_NATIVE_FUNC(functions, setRespawnTime_f_);
REGISTER_NATIVE_FUNC(functions, addHpUpTrigger_ff_);
REGISTER_NATIVE_FUNC(functions, delHpUpTrigger_ff_);
REGISTER_NATIVE_FUNC(functions, addHpDownTrigger_ff_);
REGISTER_NATIVE_FUNC(functions, delHpDownTrigger_ff_);
REGISTER_NATIVE_FUNC(functions, addHpUpTrigger_fs_);
REGISTER_NATIVE_FUNC(functions, delHpUpTrigger_fs_);
REGISTER_NATIVE_FUNC(functions, addHpDownTrigger_fs_);
REGISTER_NATIVE_FUNC(functions, delHpDownTrigger_fs_);
REGISTER_NATIVE_FUNC(functions, addChaScore1UpTrigger_ff_);
REGISTER_NATIVE_FUNC(functions, delChaScore1UpTrigger_ff_);
REGISTER_NATIVE_FUNC(functions, addChaScore1DownTrigger_ff_);
REGISTER_NATIVE_FUNC(functions, delChaScore1DownTrigger_ff_);
REGISTER_NATIVE_FUNC(functions, addChaScore1UpTrigger_fs_);
REGISTER_NATIVE_FUNC(functions, delChaScore1UpTrigger_fs_);
REGISTER_NATIVE_FUNC(functions, addChaScore1DownTrigger_fs_);
REGISTER_NATIVE_FUNC(functions, delChaScore1DownTrigger_fs_);
REGISTER_NATIVE_FUNC(functions, addNamedEntityListener_ssf_);
REGISTER_NATIVE_FUNC(functions, delNamedEntityListener_ssf_);
REGISTER_NATIVE_FUNC(functions, addNamedEntityListener_sss_);

View file

@ -190,14 +190,14 @@ arguments.
@subsection nativeFunctionsTriggers Event handler creation
- @ref addHpUpTrigger_ff_
- @ref addHpDownTrigger_ff_
- @ref delHpUpTrigger_ff_
- @ref delHpDownTrigger_ff_
- @ref addHpUpTrigger_fs_
- @ref addHpDownTrigger_fs_
- @ref delHpUpTrigger_fs_
- @ref delHpDownTrigger_fs_
- @ref addChaScore1UpTrigger_ff_
- @ref addChaScore1DownTrigger_ff_
- @ref delChaScore1UpTrigger_ff_
- @ref delChaScore1DownTrigger_ff_
- @ref addChaScore1UpTrigger_fs_
- @ref addChaScore1DownTrigger_fs_
- @ref delChaScore1UpTrigger_fs_
- @ref delChaScore1DownTrigger_fs_
- @ref addNamedEntityListener_ssf_
- @ref delNamedEntityListener_ssf_
- @ref addNamedEntityListener_sss_
@ -223,12 +223,12 @@ arguments.
- @ref stopMoving__
- @ref followPlayer_sf_
- @ref wander__
- @ref downScaleHP_f_
- @ref upScaleHP_f_
- @ref scaleHP_f_
- @ref setMaxHP_ff_
- @ref setHPLevel_f_
- @ref addHP_f_
- @ref downScaleChaScore1_f_
- @ref upScaleChaScore1_f_
- @ref scaleChaScore1_f_
- @ref setMaxChaScore1_ff_
- @ref setChaScore1Level_f_
- @ref addChaSCore1_f_
- @ref aiAction_s_
- @ref aiActionSelf_s_
- @ref setPlayerController_ss_
@ -507,11 +507,11 @@ setAutoSpawn_f_
setFactionProp_ss_
downScaleHP_f_
upScaleHP_f_
scaleHP_f_
setHPLevel_f_
addHP_f_
downScaleChaScore1_f_
upScaleChaScore1_f_
scaleChaScore1_f_
setChaScore1Level_f_
addChaScore1_f_
clamp_fff_f
min_ff_f
@ -546,14 +546,14 @@ loadFile_s_
break__
groupName_c_s
addHpUpTrigger_ff_
addHpDownTrigger_ff_
delHpUpTrigger_ff_
delHpDownTrigger_ff_
addHpUpTrigger_fs_
addHpDownTrigger_fs_
delHpUpTrigger_fs_
delHpDownTrigger_fs_
addChaScore1UpTrigger_ff_
addChaScore1DownTrigger_ff_
delChaScore1UpTrigger_ff_
delChaScore1DownTrigger_ff_
addChaScore1UpTrigger_fs_
addChaScore1DownTrigger_fs_
delChaScore1UpTrigger_fs_
delChaScore1DownTrigger_fs_
aiAction_s_
aiActionSelf_s_

View file

@ -27,9 +27,9 @@ namespace AI_EVENT_REPORT
// The conversion table
const CStringConversion<TAIReportStat>::CPair stringTable [] =
{
{ "HitPoints", HitPoints },
{ "Stamina", Stamina },
{ "Sap", Sap },
{ "ChaScore1", ChaScore1 },
{ "ChaScore2", ChaScore2 },
{ "ChaScore2", ChaScore3 },
{ "Unknown", Unknown },
};

View file

@ -29,9 +29,9 @@ namespace AI_EVENT_REPORT
{
enum TAIReportStat
{
HitPoints = 0,
Stamina,
Sap,
ChaScore1 = 0,
ChaScore2,
ChaScore3,
Unknown,
};
@ -100,7 +100,7 @@ struct CAiEventReport
TDataSetRow Originator;
/// Target
TDataSetRow Target;
/// the affected stats (Hp, sap...)
/// the affected stats (ChaScore1, ChaScore2...)
std::vector<AI_EVENT_REPORT::TAIReportStat> AffectedStats;
/// the delta values
std::vector<sint32> DeltaValue;

View file

@ -291,8 +291,8 @@ namespace AITYPES
// EffectCurseHatredDegeneres,
//
// EffectHeal,
// EffectStamina,
// EffectSap,
// EffectChaScore2,
// EffectChaScore3,
//
// EffectDotShock,
// EffectDotSlash,

View file

@ -219,39 +219,39 @@ void CAiWrapperServer::despawnEntity(NLMISC::CEntityId entityId, uint32 alias)
CUnifiedNetwork::getInstance()->send("AIS",msgout);
}
void CAiWrapperServer::setGrpHPLevel(NLMISC::CEntityId entityId, uint32 alias, float hp)
void CAiWrapperServer::setGrpChaScore1Level(NLMISC::CEntityId entityId, uint32 alias, float ChaScore1)
{
uint32 messageVersion = 1;
uint32 nbString=2;
std::string eid = entityId.toString();
std::string hpstr = NLMISC::toString("()setHPScale(%f);", hp);
std::string ChaScore1str = NLMISC::toString("()setChaScore1Scale(%f);", ChaScore1);
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
msgout.serial(messageVersion);
msgout.serial(nbString);
msgout.serial(eid);
msgout.serial(hpstr);
msgout.serial(ChaScore1str);
CUnifiedNetwork::getInstance()->send("AIS",msgout);
}
void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, float hp)
void CAiWrapperServer::setChaScore1Level(NLMISC::CEntityId entityId, uint32 alias, float ChaScore1)
{
uint32 messageVersion = 1;
uint32 nbString=2;
std::string eid = entityId.toString();
std::string hpstr = NLMISC::toString("()setBotHPScaleByAlias(%f, \"%s\");", hp, aliasToString(alias).c_str());
std::string ChaScore1str = NLMISC::toString("()setBotChaScore1ScaleByAlias(%f, \"%s\");", ChaScore1, aliasToString(alias).c_str());
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
msgout.serial(messageVersion);
msgout.serial(nbString);
msgout.serial(eid);
msgout.serial(hpstr);
msgout.serial(ChaScore1str);
CUnifiedNetwork::getInstance()->send("AIS",msgout);
}

View file

@ -299,8 +299,8 @@ AdminCommandsInit[] =
"Invulnerable", true,
"ShowFactionChannels", true,
"CreateCharacterStartSkillsValue", false,
"HP", true,
"MaxHP", true,
"ChaScore1", true,
"MaxChaScore1", true,
"Speed", true,
"Money", true,
"MoneyGuild", true,
@ -936,35 +936,35 @@ void GET_CHARACTER_Helper(std::string& command, const NLMISC::CEntityId& id, con
// Don't forget to add your command in the AdminCommandsInit array if you want the command to be executed on the client
//
ENTITY_VARIABLE(HP, "Hit points of a player")
ENTITY_VARIABLE(ChaScore1, "ChaScore1 of a player")
{
ENTITY_GET_ENTITY
if (get)
{
value = toString (e->currentHp());
value = toString (e->currentChaScore1());
}
else
{
sint32 v;
NLMISC::fromString(value, v);
e->getScores()._PhysicalScores[SCORES::hit_points].Current = v;
e->getScores()._PhysicalScores[SCORES::cha_score1].Current = v;
}
}
ENTITY_VARIABLE(MaxHP, "Max hit points of a player")
ENTITY_VARIABLE(MaxChaScore1, "Max ChaScore1 of a player")
{
ENTITY_GET_ENTITY
if (get)
{
value = toString (e->maxHp());
value = toString (e->maxChaScore1());
}
else
{
sint32 v;
NLMISC::fromString(value, v);
e->getScores()._PhysicalScores[SCORES::hit_points].Max = v;
e->getScores()._PhysicalScores[SCORES::cha_score1].Max = v;
}
}
@ -1821,7 +1821,7 @@ NLMISC_COMMAND (forceTargetToDie, "(debug) Force entity target to die", "<eid>")
if (target)
{
if (!target->isDead())
target->changeCurrentHp(-100000);
target->changeCurrentChaScore1(-100000);
BotDeathReport.Bots.push_back(target->getEntityRowId());
TDataSetRow emptyRow;
@ -2801,7 +2801,7 @@ NLMISC_COMMAND(respawnAfterDeath,"respawnAfterDeath at re-spawn point name, it m
//-----------------------------------------------
// Simulate Resurrection by other PC until UI is ready
//-----------------------------------------------
NLMISC_COMMAND(resurrected,"Another PC resurrect PC by giving some energy","<player id(id:type:crea:dyn)><Hp gived><Sta gived><Sap gived><Focus gived>")
NLMISC_COMMAND(resurrected,"Another PC resurrect PC by giving some energy","<player id(id:type:crea:dyn)><ChaScore1 removed><ChaScore2 removed><ChaScore3 removed><ChaScore4 gived>")
{
if( args.size() == 1 )
{
@ -3716,7 +3716,7 @@ NLMISC_COMMAND( killMob, "kill a mob ( /a killMob )", "<CSR eId>" )
return true;
}
}
creature->getScores()._PhysicalScores[SCORES::hit_points].Current = 0;
creature->getScores()._PhysicalScores[SCORES::cha_score1].Current = 0;
return true;
}
@ -4121,9 +4121,9 @@ NLMISC_COMMAND (targetInfos, "give infos on the target", "")
answer = "invalid creature target";
else
{
answer = NLMISC::toString( "HP : %u / %u",
target->getScores()._PhysicalScores[SCORES::hit_points].Current(),
target->getScores()._PhysicalScores[SCORES::hit_points].Max() );
answer = NLMISC::toString( "ChaScore1 : %u / %u",
target->getScores()._PhysicalScores[SCORES::cha_score1].Current(),
target->getScores()._PhysicalScores[SCORES::cha_score1].Max() );
}
}
else if ( c->getTarget().getType() == RYZOMID::player )
@ -4134,11 +4134,11 @@ NLMISC_COMMAND (targetInfos, "give infos on the target", "")
else
{
const std::vector< SCharacteristicsAndScores > & scores = target->getScores()._PhysicalScores;
answer = NLMISC::toString( "HP : %d / %d \nSAP : %d / %d \nSTA : %d / %d \nFOCUS : %d / %d \n",
scores[SCORES::hit_points].Current(),scores[SCORES::hit_points].Max(),
scores[SCORES::sap].Current(),scores[SCORES::sap].Max(),
scores[SCORES::stamina].Current(),scores[SCORES::stamina].Max(),
scores[SCORES::focus].Current(),scores[SCORES::focus].Max() );
answer = NLMISC::toString( "ChaScore1 : %d / %d \nChaScore3 : %d / %d \nChaScore2 : %d / %d \nChaScore4 : %d / %d \n",
scores[SCORES::cha_score1].Current(),scores[SCORES::cha_score1].Max(),
scores[SCORES::cha_score3].Current(),scores[SCORES::cha_score3].Max(),
scores[SCORES::cha_score2].Current(),scores[SCORES::cha_score2].Max(),
scores[SCORES::cha_score4].Current(),scores[SCORES::cha_score4].Max() );
answer += "\n Displaying skills > 1:\n";
for ( uint i = 0; i < target->getSkills()._Skills.size();i++ )
{

Some files were not shown because too many files have changed in this diff Show more