diff --git a/code/ryzom/client/data/gamedev/fd.cmd b/code/ryzom/client/data/gamedev/fd.cmd index ca176e6aa..9f9dec1a9 100644 --- a/code/ryzom/client/data/gamedev/fd.cmd +++ b/code/ryzom/client/data/gamedev/fd.cmd @@ -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 diff --git a/code/ryzom/client/data/gamedev/fd2.cmd b/code/ryzom/client/data/gamedev/fd2.cmd index bf8ba20a3..75f186229 100644 --- a/code/ryzom/client/data/gamedev/fd2.cmd +++ b/code/ryzom/client/data/gamedev/fd2.cmd @@ -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 diff --git a/code/ryzom/client/data/gamedev/fd3.cmd b/code/ryzom/client/data/gamedev/fd3.cmd index 55fc70732..0ed00d4ce 100644 --- a/code/ryzom/client/data/gamedev/fd3.cmd +++ b/code/ryzom/client/data/gamedev/fd3.cmd @@ -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 diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/config.xml b/code/ryzom/client/data/gamedev/interfaces_v3/config.xml index 7b73429c4..15214a085 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/config.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/config.xml @@ -264,16 +264,16 @@ - - - - - - - - - - - - - - - - - + + + + - + - - - + - - - + - - - + - - - - - - - - - - - - - - - - - - @@ -2923,13 +2923,13 @@ This MUST follow the Enum MISSION_DESC::TIconId - - - @@ -3464,15 +3464,15 @@ This MUST follow the Enum MISSION_DESC::TIconId - - - - - @@ -3749,69 +3749,69 @@ This MUST follow the Enum MISSION_DESC::TIconId value_from_code="getMaxTeamMember()" /> - - + - - - - + - - - - - - - - + + + + - - - - - - - - diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml b/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml index 38e63cb24..f3d3a6be6 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/game_config.xml @@ -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" /> + --> @@ -3222,7 +3222,7 @@ preset="UI:TEMP:PRESET_FX" /> - - - - - - - - - + tooltip="uittIdentityChaScore1" + text="uiChaScore1" + val="%player_ChaScore1" + maxval="%player_ChaScore1_max" + baseval="%player_ChaScore1_base" /> + tooltip="uittIdentityChaScore3" + text="uiChaScore3" + val="%player_ChaScore3" + maxval="%player_ChaScore3_max" + baseval="%player_ChaScore3_base" /> + tooltip="uittIdentityChaScore2" + text="uiChaScore2" + val="%player_ChaScore2" + maxval="%player_ChaScore2_max" + baseval="%player_ChaScore2_base" /> + tooltip="uittIdentityChaScore4" + text="uiChaScore4" + val="%player_ChaScore4" + maxval="%player_ChaScore4_max" + baseval="%player_ChaScore4_base" /> + text="uiChaScore1" + val="%player_ChaScore1reg" + baseval="%player_ChaScore1reg_base" + tooltip="uittIdentityChaScore1Reg" /> + text="uiChaScore3" + val="%player_ChaScore3reg" + baseval="%player_ChaScore3reg_base" + tooltip="uittIdentityChaScore3Reg" /> + text="uiChaScore2" + val="%player_ChaScore2reg" + baseval="%player_ChaScore2reg_base" + tooltip="uittIdentityChaScore2Reg" /> + text="uiChaScore4" + val="%player_ChaScore4reg" + baseval="%player_ChaScore4reg_base" + tooltip="uittIdentityChaScore4Reg" /> + text="uiCarac_ChaScore1Max" + val="%player_carac_ChaScore1max" + tooltip="uittIdentityCha1" /> + text="uiCarac_ChaScore3Max" + val="%player_carac_ChaScore3max" + tooltip="uittIdentityCha3" /> + text="uiCarac_ChaScore2Max" + val="%player_carac_ChaScore2max" + tooltip="uittIdentityCha2" /> + text="uiCarac_ChaScore4Max" + val="%player_carac_ChaScore4max" + tooltip="uittIdentityCha4" /> + text="uiCarac_ChaScore1Reg" + val="%player_carac_ChaScore1reg" + tooltip="uittIdentityCha1Reg" /> + text="uiCarac_ChaScore3Reg" + val="%player_carac_ChaScore3reg" + tooltip="uittIdentityCha3Reg" /> + tooltip="uittIdentityCha2Reg" /> + text="uiCarac_ChaScore4Reg" + val="%player_carac_ChaScore4reg" + tooltip="uittIdentityCha4Reg" /> + text="uiChaScore1" + val="%target_ChaScore1" /> @@ -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" /> + 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" /> diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/login_config.xml b/code/ryzom/client/data/gamedev/interfaces_v3/login_config.xml index e4b2e77e7..f74f1728e 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/login_config.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/login_config.xml @@ -1051,15 +1051,15 @@ This MUST follow the Enum MISSION_DESC::TIconId - - - - - diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/out_v2_config.xml b/code/ryzom/client/data/gamedev/interfaces_v3/out_v2_config.xml index a0ca1c01b..973d34550 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/out_v2_config.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/out_v2_config.xml @@ -227,15 +227,15 @@ - - - - - diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/outgame_career.xml b/code/ryzom/client/data/gamedev/interfaces_v3/outgame_career.xml index b793b8f21..3b1cae0e3 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/outgame_career.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/outgame_career.xml @@ -7,14 +7,14 @@ - - - - - - - - + + + + + + + + @@ -26,47 +26,47 @@ - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + @@ -74,136 +74,136 @@ - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + @@ -1156,20 +1156,20 @@ - - - - + + + + - - - - + + + + @@ -1810,4 +1810,4 @@ - \ No newline at end of file + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/outgame_config.xml b/code/ryzom/client/data/gamedev/interfaces_v3/outgame_config.xml index a56d622f7..0edcdd1b1 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/outgame_config.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/outgame_config.xml @@ -221,15 +221,15 @@ - - - - - diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/outgame_summary.xml b/code/ryzom/client/data/gamedev/interfaces_v3/outgame_summary.xml index 34004be1f..3b732c076 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/outgame_summary.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/outgame_summary.xml @@ -545,10 +545,10 @@ - - - - + + + + --> @@ -920,4 +920,4 @@ - \ No newline at end of file + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/phrase.xml b/code/ryzom/client/data/gamedev/interfaces_v3/phrase.xml index 426303058..02fcfae97 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/phrase.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/phrase.xml @@ -732,17 +732,17 @@ global_color="false" /> - + - + - + - + @@ -756,9 +756,9 @@ + 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" /> diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/player.lua b/code/ryzom/client/data/gamedev/interfaces_v3/player.lua index 3827593b1..56887b9f0 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/player.lua +++ b/code/ryzom/client/data/gamedev/interfaces_v3/player.lua @@ -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 diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/player.xml b/code/ryzom/client/data/gamedev/interfaces_v3/player.xml index 997d151fc..bd94b2a2c 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/player.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/player.xml @@ -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" /> - - + - + + params="dblink=UI:SAVE:PLAYER:DISP_ChaScore4|value=not(@UI:SAVE:PLAYER:DISP_ChaScore4)" /> - + text="uiChaScore1" + val="%player_ChaScore1" + maxval="%player_ChaScore1_max" + val_bar="%player_ChaScore1_percent" + tooltip="uittGaugesChaScore1" /> + text="uiChaScore3" + val="%player_ChaScore3" + maxval="%player_ChaScore3_max" + val_bar="%player_ChaScore3_percent" + tooltip="uittGaugesChaScore3" /> + text="uiChaScore2" + val="%player_ChaScore2" + maxval="%player_ChaScore2_max" + val_bar="%player_ChaScore2_percent" + tooltip="uittGaugesChaScore2" /> + text="uiChaScore4" + val="%player_ChaScore4" + maxval="%player_ChaScore4_max" + val_bar="%player_ChaScore4_percent" + tooltip="uittGaugesChaScore4" /> - - - - - + @@ -162,10 +158,10 @@ - - - - + + + + @@ -173,10 +169,10 @@ - - - - + + + + @@ -187,7 +183,7 @@ - + @@ -237,9 +233,9 @@ - - - + + + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml index b806edb8d..ecfaec5c2 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml @@ -3897,39 +3897,39 @@ active="false" global_color="false"/> + posparent="ChaScore1_cost" /> + posparent="ChaScore2_cost" /> + posparent="ChaScore3_cost" /> + posparent="ChaScore4_cost" /> @@ -4104,7 +4104,7 @@ line_maxw="300" multi_line_maxw_only="true" /> + posparent="ChaScore1_buff" /> + posparent="ChaScore2_buff" /> + posparent="ChaScore3_buff" /> @@ -6927,203 +6927,7 @@ - - - - - - - + - - - diff --git a/code/ryzom/client/data/gamedev/pa.cmd b/code/ryzom/client/data/gamedev/pa.cmd index 4acd773dd..642f7ff0f 100644 --- a/code/ryzom/client/data/gamedev/pa.cmd +++ b/code/ryzom/client/data/gamedev/pa.cmd @@ -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 diff --git a/code/ryzom/client/data/gamedev/steed.cmd b/code/ryzom/client/data/gamedev/steed.cmd index 7b4287563..eeb28dc05 100644 --- a/code/ryzom/client/data/gamedev/steed.cmd +++ b/code/ryzom/client/data/gamedev/steed.cmd @@ -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 \ No newline at end of file +db SERVER:PACK_ANIMAL:STEED:ChaScore1 32 +db SERVER:PACK_ANIMAL:STEED:ChaScore3 32 +db SERVER:PACK_ANIMAL:STEED:ChaScore2 32 \ No newline at end of file diff --git a/code/ryzom/client/data/gamedev/team.cmd b/code/ryzom/client/data/gamedev/team.cmd index 72ccb21a9..f475bc92e 100644 --- a/code/ryzom/client/data/gamedev/team.cmd +++ b/code/ryzom/client/data/gamedev/team.cmd @@ -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 diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 5d949b201..7f22d81e3 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -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 &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; iaddHPOutput(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 ¤tTimeInMs, 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 ¤tTimeInMs, 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::iterator itTmp; - std::list::iterator it = _HPDisplayed.begin(); - while(it != _HPDisplayed.end()) + std::list::iterator itTmp; + std::list::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", " applyBehaviour(bc); return true; } @@ -10088,7 +10088,7 @@ NLMISC_COMMAND(rangeAttack, "simulate a range attack", " [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; } diff --git a/code/ryzom/client/src/character_cl.h b/code/ryzom/client/src/character_cl.h index e2057d693..0a65a67c9 100644 --- a/code/ryzom/client/src/character_cl.h +++ b/code/ryzom/client/src/character_cl.h @@ -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 &fxList, const CLFECOMMON::TCLEntityId &slotRemoved); - // apply the flying HP related to behaviour - void applyBehaviourFlyingHPs(const CBehaviourContext &bc, const MBEHAV::CBehaviour &behaviour, const std::vector &targetHitDates); + // apply the flying ChaScore1 related to behaviour + void applyBehaviourFlyingChaScore1s(const CBehaviourContext &bc, const MBEHAV::CBehaviour &behaviour, const std::vector &targetHitDates); protected: // retrieve attack from an id and a list of attack lists filenames diff --git a/code/ryzom/client/src/client_sheets/animation_set_list_sheet.h b/code/ryzom/client/src/client_sheets/animation_set_list_sheet.h index ad991dae1..b75c213ba 100644 --- a/code/ryzom/client/src/client_sheets/animation_set_list_sheet.h +++ b/code/ryzom/client/src/client_sheets/animation_set_list_sheet.h @@ -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, diff --git a/code/ryzom/client/src/client_sheets/item_sheet.cpp b/code/ryzom/client/src/client_sheets/item_sheet.cpp index afc2f6413..72183d9cc 100644 --- a/code/ryzom/client/src/client_sheets/item_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/item_sheet.cpp @@ -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; diff --git a/code/ryzom/client/src/client_sheets/pact_sheet.cpp b/code/ryzom/client/src/client_sheets/pact_sheet.cpp index 4ea80299b..37d64e2e9 100644 --- a/code/ryzom/client/src/client_sheets/pact_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/pact_sheet.cpp @@ -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; diff --git a/code/ryzom/client/src/client_sheets/pact_sheet.h b/code/ryzom/client/src/client_sheets/pact_sheet.h index 986b1f40f..daca88300 100644 --- a/code/ryzom/client/src/client_sheets/pact_sheet.h +++ b/code/ryzom/client/src/client_sheets/pact_sheet.h @@ -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 ); diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index 60c6ba356..6f2508302 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -695,7 +695,7 @@ NLMISC_COMMAND(bugReport, "Call the bug report tool with dump", " 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", " [ return true; } -NLMISC_COMMAND(behaviour, "Change the behaviour for an entity in a slot", " [] [] [] [dt(tick)]") +NLMISC_COMMAND(behaviour, "Change the behaviour for an entity in a slot", " [] [] [] [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", " 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; diff --git a/code/ryzom/client/src/entity_cl.h b/code/ryzom/client/src/entity_cl.h index 328ec1cc7..60d1c1abd 100644 --- a/code/ryzom/client/src/entity_cl.h +++ b/code/ryzom/client/src/entity_cl.h @@ -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 _HPModifiers; + std::list _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 _HPDisplayed; + std::list _ChaScore1Displayed; // The transparency factor float _TranspFactor; // 0 - opaque 1 - transparent diff --git a/code/ryzom/client/src/forage_source_cl.cpp b/code/ryzom/client/src/forage_source_cl.cpp index b99d37218..2bb21d80a 100644 --- a/code/ryzom/client/src/forage_source_cl.cpp +++ b/code/ryzom/client/src/forage_source_cl.cpp @@ -215,13 +215,13 @@ void CForageSourceCL::updateClipped (const NLMISC::TTime ¤tTimeInMs, 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::iterator itTmp; - std::list::iterator it = _HPDisplayed.begin(); - while(it != _HPDisplayed.end()) + std::list::iterator itTmp; + std::list::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; diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 445e95097..c12f7406e 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -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"); diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index 072d53591..e4959ddb9 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -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"; diff --git a/code/ryzom/client/src/interface_v3/bar_manager.cpp b/code/ryzom/client/src/interface_v3/bar_manager.cpp index 21281a700..8c1665044 100644 --- a/code/ryzom/client/src/interface_v3/bar_manager.cpp +++ b/code/ryzom/client/src/interface_v3/bar_manager.cpp @@ -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(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(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(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(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; } } } diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h index 8c697d660..e1becbbb9 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h @@ -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); diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 53cddc93b..cc42f4322 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -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 _Title; NLMISC::CRefPtr _RPTags; NLMISC::CRefPtr _GuildName; - NLMISC::CRefPtr _HP; - NLMISC::CRefPtr _Sta; - NLMISC::CRefPtr _Sap; - NLMISC::CRefPtr _Focus; + NLMISC::CRefPtr _ChaScore1; + NLMISC::CRefPtr _ChaScore2; + NLMISC::CRefPtr _ChaScore3; + NLMISC::CRefPtr _ChaScore4; NLMISC::CRefPtr _Action; NLMISC::CRefPtr _Messages; NLMISC::CRefPtr _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(_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(_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(_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); } } diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.h b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.h index 3869a74b1..b2843341b 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.h +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.h @@ -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; diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index de06251f7..0b5e6b33a 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -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(); diff --git a/code/ryzom/client/src/interface_v3/item_consumable_effect.cpp b/code/ryzom/client/src/interface_v3/item_consumable_effect.cpp index 6e50666b1..e98a80407 100644 --- a/code/ryzom/client/src/interface_v3/item_consumable_effect.cpp +++ b/code/ryzom/client/src/interface_v3/item_consumable_effect.cpp @@ -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)); diff --git a/code/ryzom/client/src/interface_v3/sbrick_manager.cpp b/code/ryzom/client/src/interface_v3/sbrick_manager.cpp index 86946e2e1..bdd707c8a 100644 --- a/code/ryzom/client/src/interface_v3/sbrick_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sbrick_manager.cpp @@ -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"); diff --git a/code/ryzom/client/src/interface_v3/sbrick_manager.h b/code/ryzom/client/src/interface_v3/sbrick_manager.h index d963309bf..00d86ce91 100644 --- a/code/ryzom/client/src/interface_v3/sbrick_manager.h +++ b/code/ryzom/client/src/interface_v3/sbrick_manager.h @@ -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; // @} diff --git a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp index 0b96f77a3..fc0b840c7 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp @@ -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; } diff --git a/code/ryzom/client/src/interface_v3/sphrase_manager.h b/code/ryzom/client/src/interface_v3/sphrase_manager.h index d4c1b2092..ba48b8399 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.h +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.h @@ -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 diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index ead456a81..cf047551d 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -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 ); diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.h b/code/ryzom/client/src/r2/dmc/client_edition_module.h index 54afda5cb..0cffdaa7a 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.h +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.h @@ -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& args); diff --git a/code/ryzom/client/src/r2/dmc/dmc.cpp b/code/ryzom/client/src/r2/dmc/dmc.cpp index 0659f0a56..35a2ad54a 100644 --- a/code/ryzom/client/src/r2/dmc/dmc.cpp +++ b/code/ryzom/client/src/r2/dmc/dmc.cpp @@ -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"); } } diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 1d0c27570..5ee47afff 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -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 diff --git a/code/ryzom/common/data_common/chat/chat_static.occ b/code/ryzom/common/data_common/chat/chat_static.occ index 9f3235086..8c3558301 100644 --- a/code/ryzom/common/data_common/chat/chat_static.occ +++ b/code/ryzom/common/data_common/chat/chat_static.occ @@ -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 diff --git a/code/ryzom/common/data_common/database.xml b/code/ryzom/common/data_common/database.xml index fc0d1d209..bfa0c86e0 100644 --- a/code/ryzom/common/data_common/database.xml +++ b/code/ryzom/common/data_common/database.xml @@ -173,13 +173,13 @@ - - - - @@ -253,11 +253,11 @@ - - - @@ -1025,21 +1025,21 @@ - - - - - - @@ -1512,6 +1512,8 @@ type="I5" /> + + description="server update the players Bars (fast message) $msgNumber $cha_score1 $cha_score3 $cha_score2 $cha_score4" /> diff --git a/code/ryzom/common/src/game_share/ai_wrapper.h b/code/ryzom/common/src/game_share/ai_wrapper.h index c0bac40a2..de6206727 100644 --- a/code/ryzom/common/src/game_share/ai_wrapper.h +++ b/code/ryzom/common/src/game_share/ai_wrapper.h @@ -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); diff --git a/code/ryzom/common/src/game_share/brick_families.cpp b/code/ryzom/common/src/game_share/brick_families.cpp index ead3e827b..7e1616005 100644 --- a/code/ryzom/common/src/game_share/brick_families.cpp +++ b/code/ryzom/common/src/game_share/brick_families.cpp @@ -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) diff --git a/code/ryzom/common/src/game_share/brick_families.h b/code/ryzom/common/src/game_share/brick_families.h index b916ee2bd..837299e67 100644 --- a/code/ryzom/common/src/game_share/brick_families.h +++ b/code/ryzom/common/src/game_share/brick_families.h @@ -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, diff --git a/code/ryzom/common/src/game_share/brick_flags.cpp b/code/ryzom/common/src/game_share/brick_flags.cpp index 062b04d88..7709fc31e 100644 --- a/code/ryzom/common/src/game_share/brick_flags.cpp +++ b/code/ryzom/common/src/game_share/brick_flags.cpp @@ -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) diff --git a/code/ryzom/common/src/game_share/brick_flags.h b/code/ryzom/common/src/game_share/brick_flags.h index 0f0677b46..5ad959fcc 100644 --- a/code/ryzom/common/src/game_share/brick_flags.h +++ b/code/ryzom/common/src/game_share/brick_flags.h @@ -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, diff --git a/code/ryzom/common/src/game_share/characteristics.cpp b/code/ryzom/common/src/game_share/characteristics.cpp index f599c9a32..bc8fb5050 100644 --- a/code/ryzom/common/src/game_share/characteristics.cpp +++ b/code/ryzom/common/src/game_share/characteristics.cpp @@ -31,14 +31,14 @@ namespace CHARACTERISTICS // The conversion table const CStringConversion::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::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 codeCharac(codeTable, sizeof(codeTable) / sizeof(codeTable[0]), Unknown ); diff --git a/code/ryzom/common/src/game_share/characteristics.h b/code/ryzom/common/src/game_share/characteristics.h index e2714fdf2..e632da097 100644 --- a/code/ryzom/common/src/game_share/characteristics.h +++ b/code/ryzom/common/src/game_share/characteristics.h @@ -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 ); diff --git a/code/ryzom/common/src/game_share/effect_families.cpp b/code/ryzom/common/src/game_share/effect_families.cpp index 8d00cf200..05fdde2e3 100644 --- a/code/ryzom/common/src/game_share/effect_families.cpp +++ b/code/ryzom/common/src/game_share/effect_families.cpp @@ -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 }, diff --git a/code/ryzom/common/src/game_share/effect_families.h b/code/ryzom/common/src/game_share/effect_families.h index e05b05a34..0207fd7a2 100644 --- a/code/ryzom/common/src/game_share/effect_families.h +++ b/code/ryzom/common/src/game_share/effect_families.h @@ -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, diff --git a/code/ryzom/common/src/game_share/item_infos.cpp b/code/ryzom/common/src/game_share/item_infos.cpp index 02af62f45..5e249117d 100644 --- a/code/ryzom/common/src/game_share/item_infos.cpp +++ b/code/ryzom/common/src/game_share/item_infos.cpp @@ -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 ); diff --git a/code/ryzom/common/src/game_share/item_infos.h b/code/ryzom/common/src/game_share/item_infos.h index 1cb32ae41..24373ac64 100644 --- a/code/ryzom/common/src/game_share/item_infos.h +++ b/code/ryzom/common/src/game_share/item_infos.h @@ -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 diff --git a/code/ryzom/common/src/game_share/magic_fx.cpp b/code/ryzom/common/src/game_share/magic_fx.cpp index b9371fdb4..cb6733159 100644 --- a/code/ryzom/common/src/game_share/magic_fx.cpp +++ b/code/ryzom/common/src/game_share/magic_fx.cpp @@ -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; } } } diff --git a/code/ryzom/common/src/game_share/magic_fx.h b/code/ryzom/common/src/game_share/magic_fx.h index 2a46475e8..2438c3302 100644 --- a/code/ryzom/common/src/game_share/magic_fx.h +++ b/code/ryzom/common/src/game_share/magic_fx.h @@ -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, diff --git a/code/ryzom/common/src/game_share/mode_and_behaviour.cpp b/code/ryzom/common/src/game_share/mode_and_behaviour.cpp index f6e4a100d..0925d1036 100644 --- a/code/ryzom/common/src/game_share/mode_and_behaviour.cpp +++ b/code/ryzom/common/src/game_share/mode_and_behaviour.cpp @@ -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) diff --git a/code/ryzom/common/src/game_share/mode_and_behaviour.h b/code/ryzom/common/src/game_share/mode_and_behaviour.h index ca25c468a..59dc8c6e5 100644 --- a/code/ryzom/common/src/game_share/mode_and_behaviour.h +++ b/code/ryzom/common/src/game_share/mode_and_behaviour.h @@ -235,7 +235,7 @@ namespace MBEHAV CAST_ELEC, CAST_FEAR, CAST_FIRE, - CAST_HEALHP, + CAST_HEALChaScore1, CAST_MAD, CAST_POISON, CAST_ROOT, @@ -286,17 +286,7 @@ 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; } diff --git a/code/ryzom/common/src/game_share/power_types.cpp b/code/ryzom/common/src/game_share/power_types.cpp index 73020a9c3..38c8e5f52 100644 --- a/code/ryzom/common/src/game_share/power_types.cpp +++ b/code/ryzom/common/src/game_share/power_types.cpp @@ -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) diff --git a/code/ryzom/common/src/game_share/power_types.h b/code/ryzom/common/src/game_share/power_types.h index 54c32a221..5a29dcbeb 100644 --- a/code/ryzom/common/src/game_share/power_types.h +++ b/code/ryzom/common/src/game_share/power_types.h @@ -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, diff --git a/code/ryzom/common/src/game_share/ryzom_mirror_properties.cpp b/code/ryzom/common/src/game_share/ryzom_mirror_properties.cpp index d8824c386..6406c99ae 100644 --- a/code/ryzom/common/src/game_share/ryzom_mirror_properties.cpp +++ b/code/ryzom/common/src/game_share/ryzom_mirror_properties.cpp @@ -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 ); diff --git a/code/ryzom/common/src/game_share/ryzom_mirror_properties.h b/code/ryzom/common/src/game_share/ryzom_mirror_properties.h index 134ebe38b..37463c4cc 100644 --- a/code/ryzom/common/src/game_share/ryzom_mirror_properties.h +++ b/code/ryzom/common/src/game_share/ryzom_mirror_properties.h @@ -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 diff --git a/code/ryzom/common/src/game_share/scores.cpp b/code/ryzom/common/src/game_share/scores.cpp index 0df0d96f6..dc675f368 100644 --- a/code/ryzom/common/src/game_share/scores.cpp +++ b/code/ryzom/common/src/game_share/scores.cpp @@ -30,10 +30,10 @@ namespace SCORES // The conversion table const CStringConversion::CPair stringTable [] = { - { "HitPoints", hit_points }, - { "Stamina", stamina }, - { "Sap", sap }, - { "Focus", focus }, + { "ChaScore1", cha_score1 }, + { "ChaScore2", cha_score2 }, + { "ChaScore3", cha_score3 }, + { "ChaScore4", cha_score4 }, }; CStringConversion conversion(stringTable, sizeof(stringTable) / sizeof(stringTable[0]), unknown); diff --git a/code/ryzom/common/src/game_share/scores.h b/code/ryzom/common/src/game_share/scores.h index 1cde63af1..b47763990 100644 --- a/code/ryzom/common/src/game_share/scores.h +++ b/code/ryzom/common/src/game_share/scores.h @@ -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 diff --git a/code/ryzom/common/src/game_share/server_animation_module.cpp b/code/ryzom/common/src/game_share/server_animation_module.cpp index 199a983ef..aa83afd92 100644 --- a/code/ryzom/common/src/game_share/server_animation_module.cpp +++ b/code/ryzom/common/src/game_share/server_animation_module.cpp @@ -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; } diff --git a/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset b/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset index b891b6252..2203ecc8e 100644 --- a/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset +++ b/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset @@ -178,14 +178,14 @@ - + - + diff --git a/code/ryzom/server/src/ai_service/ai.cpp b/code/ryzom/server/src/ai_service/ai.cpp index 49144fa9d..8c8a642ed 100644 --- a/code/ryzom/server/src/ai_service/ai.cpp +++ b/code/ryzom/server/src/ai_service/ai.cpp @@ -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(); } } diff --git a/code/ryzom/server/src/ai_service/ai.h b/code/ryzom/server/src/ai_service/ai.h index 57ff524ec..ce2754b8f 100644 --- a/code/ryzom/server/src/ai_service/ai.h +++ b/code/ryzom/server/src/ai_service/ai.h @@ -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 _EmotNames; diff --git a/code/ryzom/server/src/ai_service/ai_bot.cpp b/code/ryzom/server/src/ai_service/ai_bot.cpp index 2fb47023a..65c8c3bb9 100644 --- a/code/ryzom/server/src/ai_service/ai_bot.cpp +++ b/code/ryzom/server/src/ai_service/ai_bot.cpp @@ -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) { } diff --git a/code/ryzom/server/src/ai_service/ai_bot.h b/code/ryzom/server/src/ai_service/ai_bot.h index 9810dcd41..a5cc1b5ed 100644 --- a/code/ryzom/server/src/ai_service/ai_bot.h +++ b/code/ryzom/server/src/ai_service/ai_bot.h @@ -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 { diff --git a/code/ryzom/server/src/ai_service/ai_bot_fauna.cpp b/code/ryzom/server/src/ai_service/ai_bot_fauna.cpp index a6573d4bb..254b6847a 100644 --- a/code/ryzom/server/src/ai_service/ai_bot_fauna.cpp +++ b/code/ryzom/server/src/ai_service/ai_bot_fauna.cpp @@ -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(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); diff --git a/code/ryzom/server/src/ai_service/ai_bot_npc.cpp b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp index 201cc517c..d408db9d6 100644 --- a/code/ryzom/server/src/ai_service/ai_bot_npc.cpp +++ b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp @@ -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(); } } diff --git a/code/ryzom/server/src/ai_service/ai_bot_npc.h b/code/ryzom/server/src/ai_service/ai_bot_npc.h index 3455e7f58..7afe40c79 100644 --- a/code/ryzom/server/src/ai_service/ai_bot_npc.h +++ b/code/ryzom/server/src/ai_service/ai_bot_npc.h @@ -101,7 +101,7 @@ public: private: std::vector _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; diff --git a/code/ryzom/server/src/ai_service/ai_entity_physical.h b/code/ryzom/server/src/ai_service/ai_entity_physical.h index 5eb30b34f..000c22340 100644 --- a/code/ryzom/server/src/ai_service/ai_entity_physical.h +++ b/code/ryzom/server/src/ai_service/ai_entity_physical.h @@ -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 _RunSpeed; CMirrorPropValueRO _WalkSpeed; - CMirrorPropValueRO _CurrentHitPoint; - CMirrorPropValueRO _MaxHitPoint; + CMirrorPropValueRO _CurrentChaScore1; + CMirrorPropValueRO _MaxChaScore1; CMirrorPropValueRO _VisionCounter; CMirrorPropValue _InOutpostAlias; CMirrorPropValue _InOutpostSide; diff --git a/code/ryzom/server/src/ai_service/ai_entity_physical_inline.h b/code/ryzom/server/src/ai_service/ai_entity_physical_inline.h index a865edb6f..e1766d2c0 100644 --- a/code/ryzom/server/src/ai_service/ai_entity_physical_inline.h +++ b/code/ryzom/server/src/ai_service/ai_entity_physical_inline.h @@ -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); diff --git a/code/ryzom/server/src/ai_service/ai_generic_fight.cpp b/code/ryzom/server/src/ai_service/ai_generic_fight.cpp index cec456267..f605ab947 100644 --- a/code/ryzom/server/src/ai_service/ai_generic_fight.cpp +++ b/code/ryzom/server/src/ai_service/ai_generic_fight.cpp @@ -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(); diff --git a/code/ryzom/server/src/ai_service/ai_generic_fight_helpers.cpp b/code/ryzom/server/src/ai_service/ai_generic_fight_helpers.cpp index f6d0af29d..f6051702a 100644 --- a/code/ryzom/server/src/ai_service/ai_generic_fight_helpers.cpp +++ b/code/ryzom/server/src/ai_service/ai_generic_fight_helpers.cpp @@ -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 */ diff --git a/code/ryzom/server/src/ai_service/ai_grp_npc.cpp b/code/ryzom/server/src/ai_service/ai_grp_npc.cpp index 056293a25..9d9dfb488 100644 --- a/code/ryzom/server/src/ai_service/ai_grp_npc.cpp +++ b/code/ryzom/server/src/ai_service/ai_grp_npc.cpp @@ -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 (newValsecond]); } - 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; diff --git a/code/ryzom/server/src/ai_service/ai_grp_npc.h b/code/ryzom/server/src/ai_service/ai_grp_npc.h index bac75d1a9..390ba0e42 100644 --- a/code/ryzom/server/src/ai_service/ai_grp_npc.h +++ b/code/ryzom/server/src/ai_service/ai_grp_npc.h @@ -201,18 +201,18 @@ public: AITYPES::CPropertySetWithExtraList 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 _ennemyFaction; AITYPES::CPropertySetWithExtraList _friendFaction; - typedef std::multimap THpTriggerList; - typedef std::multimap THpTriggerList2; - THpTriggerList _hpUpTriggers; - THpTriggerList _hpDownTriggers; - THpTriggerList2 _hpUpTriggers2; - THpTriggerList2 _hpDownTriggers2; + typedef std::multimap TChaScore1TriggerList; + typedef std::multimap TChaScore1TriggerList2; + TChaScore1TriggerList _ChaScore1UpTriggers; + TChaScore1TriggerList _ChaScore1DownTriggers; + TChaScore1TriggerList2 _ChaScore1UpTriggers2; + TChaScore1TriggerList2 _ChaScore1DownTriggers2; typedef std::multimap, int> TNamedEntityListenerList; TNamedEntityListenerList _namedEntityListeners; diff --git a/code/ryzom/server/src/ai_service/ai_player.cpp b/code/ryzom/server/src/ai_service/ai_player.cpp index 3870cfa60..eef9f9d7d 100644 --- a/code/ryzom/server/src/ai_service/ai_player.cpp +++ b/code/ryzom/server/src/ai_service/ai_player.cpp @@ -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(); diff --git a/code/ryzom/server/src/ai_service/ai_profile_npc.cpp b/code/ryzom/server/src/ai_service/ai_profile_npc.cpp index 73c0bddcb..ad1d938ca 100644 --- a/code/ryzom/server/src/ai_service/ai_profile_npc.cpp +++ b/code/ryzom/server/src/ai_service/ai_profile_npc.cpp @@ -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)) diff --git a/code/ryzom/server/src/ai_service/ai_script_comp.cpp b/code/ryzom/server/src/ai_service/ai_script_comp.cpp index 87cbb939d..abd6b6f69 100644 --- a/code/ryzom/server/src/ai_service/ai_script_comp.cpp +++ b/code/ryzom/server/src/ai_service/ai_script_comp.cpp @@ -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 _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: ,"); + throw ReadFightActionException("ChaScore1%LESS Needs 2 Params: ,"); - float hpLimit=(float)atof(params[0].c_str()); + float ChaScore1Limit=(float)atof(params[0].c_str()); CSmartPtr 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 _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: ,"); + throw ReadFightActionException("ChaScore1%MORE Needs 2 Params: ,"); - float hpLimit=(float)atof(params[0].c_str()); + float ChaScore1Limit=(float)atof(params[0].c_str()); CSmartPtr 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()); diff --git a/code/ryzom/server/src/ai_service/family_profile_tribe.cpp b/code/ryzom/server/src/ai_service/family_profile_tribe.cpp index e0a50289f..fd69ee894 100644 --- a/code/ryzom/server/src/ai_service/family_profile_tribe.cpp +++ b/code/ryzom/server/src/ai_service/family_profile_tribe.cpp @@ -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(); diff --git a/code/ryzom/server/src/ai_service/messages.cpp b/code/ryzom/server/src/ai_service/messages.cpp index 809320de4..b67d4c19c 100644 --- a/code/ryzom/server/src/ai_service/messages.cpp +++ b/code/ryzom/server/src/ai_service/messages.cpp @@ -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); diff --git a/code/ryzom/server/src/ai_service/mirrors.cpp b/code/ryzom/server/src/ai_service/mirrors.cpp index e567a1e48..a5e3f3898 100644 --- a/code/ryzom/server/src/ai_service/mirrors.cpp +++ b/code/ryzom/server/src/ai_service/mirrors.cpp @@ -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 ); diff --git a/code/ryzom/server/src/ai_service/nf_grp.cpp b/code/ryzom/server/src/ai_service/nf_grp.cpp index 47ee114cb..3a5ba924b 100644 --- a/code/ryzom/server/src/ai_service/nf_grp.cpp +++ b/code/ryzom/server/src/ai_service/nf_grp.cpp @@ -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, 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, 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, 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, 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, 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, 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, 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, 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 mirrorSymbol( TheDataset, playerRow, DSPropertyCURRENT_HIT_POINTS ); + // return DSPropertyCURRENT_ChaScore1 Mirror value + CMirrorPropValue 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 mirrorSymbol( TheDataset, playerRow, DSPropertyMAX_HIT_POINTS ); + // return DSPropertyMAX_ChaScore1 Mirror value + CMirrorPropValue 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 mirrorSymbol( TheDataset, playerRow, DSPropertyCURRENT_HIT_POINTS ); - CMirrorPropValue mirrorSymbol2( TheDataset, playerRow, DSPropertyMAX_HIT_POINTS ); + CMirrorPropValue mirrorSymbol( TheDataset, playerRow, DSPropertyCURRENT_ChaScore1 ); + CMirrorPropValue 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 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_); diff --git a/code/ryzom/server/src/ai_service/nf_grp_npc.cpp b/code/ryzom/server/src/ai_service/nf_grp_npc.cpp index dbe005544..bd3b14967 100644 --- a/code/ryzom/server/src/ai_service/nf_grp_npc.cpp +++ b/code/ryzom/server/src/ai_service/nf_grp_npc.cpp @@ -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(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(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(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(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(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(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(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(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 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_); diff --git a/code/ryzom/server/src/ai_service/script_compiler_native_func.cpp b/code/ryzom/server/src/ai_service/script_compiler_native_func.cpp index 1921d43f0..2eb116e37 100644 --- a/code/ryzom/server/src/ai_service/script_compiler_native_func.cpp +++ b/code/ryzom/server/src/ai_service/script_compiler_native_func.cpp @@ -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_ diff --git a/code/ryzom/server/src/ai_share/ai_event_report.cpp b/code/ryzom/server/src/ai_share/ai_event_report.cpp index a9be0866f..e6f7649c5 100644 --- a/code/ryzom/server/src/ai_share/ai_event_report.cpp +++ b/code/ryzom/server/src/ai_share/ai_event_report.cpp @@ -27,9 +27,9 @@ namespace AI_EVENT_REPORT // The conversion table const CStringConversion::CPair stringTable [] = { - { "HitPoints", HitPoints }, - { "Stamina", Stamina }, - { "Sap", Sap }, + { "ChaScore1", ChaScore1 }, + { "ChaScore2", ChaScore2 }, + { "ChaScore2", ChaScore3 }, { "Unknown", Unknown }, }; diff --git a/code/ryzom/server/src/ai_share/ai_event_report.h b/code/ryzom/server/src/ai_share/ai_event_report.h index 804ebd451..470c5ddc5 100644 --- a/code/ryzom/server/src/ai_share/ai_event_report.h +++ b/code/ryzom/server/src/ai_share/ai_event_report.h @@ -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 AffectedStats; /// the delta values std::vector DeltaValue; diff --git a/code/ryzom/server/src/ai_share/ai_types.h b/code/ryzom/server/src/ai_share/ai_types.h index c9ff5a238..0a2e76bf2 100644 --- a/code/ryzom/server/src/ai_share/ai_types.h +++ b/code/ryzom/server/src/ai_share/ai_types.h @@ -291,8 +291,8 @@ namespace AITYPES // EffectCurseHatredDegeneres, // // EffectHeal, -// EffectStamina, -// EffectSap, +// EffectChaScore2, +// EffectChaScore3, // // EffectDotShock, // EffectDotSlash, diff --git a/code/ryzom/server/src/ai_share/ai_wrapper_server.cpp b/code/ryzom/server/src/ai_share/ai_wrapper_server.cpp index 70fd09aed..0a684edf2 100644 --- a/code/ryzom/server/src/ai_share/ai_wrapper_server.cpp +++ b/code/ryzom/server/src/ai_share/ai_wrapper_server.cpp @@ -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); } diff --git a/code/ryzom/server/src/entities_game_service/admin.cpp b/code/ryzom/server/src/entities_game_service/admin.cpp index e92657c3e..1ffcff1a4 100644 --- a/code/ryzom/server/src/entities_game_service/admin.cpp +++ b/code/ryzom/server/src/entities_game_service/admin.cpp @@ -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", "") 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","") +NLMISC_COMMAND(resurrected,"Another PC resurrect PC by giving some energy","") { if( args.size() == 1 ) { @@ -3716,7 +3716,7 @@ NLMISC_COMMAND( killMob, "kill a mob ( /a killMob )", "" ) 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++ ) { diff --git a/code/ryzom/server/src/entities_game_service/building_manager/building_physical.cpp b/code/ryzom/server/src/entities_game_service/building_manager/building_physical.cpp index 30374ec3d..c4f6c5d96 100644 --- a/code/ryzom/server/src/entities_game_service/building_manager/building_physical.cpp +++ b/code/ryzom/server/src/entities_game_service/building_manager/building_physical.cpp @@ -90,7 +90,7 @@ bool IBuildingPhysical::addUser(CCharacter * user, uint16 roomIdx, uint16 ownerI } - if (user->currentHp() <= 0 ) + if (user->currentChaScore1() <= 0 ) { nlwarning("user %s is dead",user->getId().toString().c_str()); return false; diff --git a/code/ryzom/server/src/entities_game_service/creature_manager/creature.cpp b/code/ryzom/server/src/entities_game_service/creature_manager/creature.cpp index 5a0f8873a..869c1fb4b 100644 --- a/code/ryzom/server/src/entities_game_service/creature_manager/creature.cpp +++ b/code/ryzom/server/src/entities_game_service/creature_manager/creature.cpp @@ -239,12 +239,12 @@ CCreature * CCreature::getCreatureCopy( const NLMISC::CEntityId & entityId, sint CMirrorPropValue value3Src( TheDataset, _EntityRowId, DSPropertyVPA ); value3Dest = value3Src.getValue(); - CMirrorPropValue value4Dest( TheDataset, entityRowId, DSPropertyCURRENT_HIT_POINTS ); - CMirrorPropValue value4Src( TheDataset, _EntityRowId, DSPropertyCURRENT_HIT_POINTS ); + CMirrorPropValue value4Dest( TheDataset, entityRowId, DSPropertyCURRENT_ChaScore1 ); + CMirrorPropValue value4Src( TheDataset, _EntityRowId, DSPropertyCURRENT_ChaScore1 ); value4Dest = value4Src.getValue(); - CMirrorPropValue value5Dest( TheDataset, entityRowId, DSPropertyMAX_HIT_POINTS ); - CMirrorPropValue value5Src( TheDataset, _EntityRowId, DSPropertyMAX_HIT_POINTS ); + CMirrorPropValue value5Dest( TheDataset, entityRowId, DSPropertyMAX_ChaScore1 ); + CMirrorPropValue value5Src( TheDataset, _EntityRowId, DSPropertyMAX_ChaScore1 ); value5Dest = value5Src.getValue(); CMirrorPropValue value6Dest( TheDataset, entityRowId, DSPropertySHEET ); @@ -450,11 +450,11 @@ void CCreature::displayModifiedAttributes(CEntityId id, NLMISC::CLog &log) log.displayNL("Size : %i [%i]", _Size, baseForm->getSize()); log.displayNL("Faction : %d [%d]", _Faction, baseForm->getFaction()); log.displayNL("FameByKill : %d [%d]", _FameByKill, baseForm->getFameByKill()); - log.displayNL("HP : %d [%d]", _PhysScores._PhysicalScores[SCORES::hit_points].Base, baseForm->getScores(SCORES::hit_points)); + log.displayNL("ChaScore1 : %d [%d]", _PhysScores._PhysicalScores[SCORES::cha_score1].Base, baseForm->getScores(SCORES::cha_score1)); //attributes only present in sheets, are they really used? log.displayNL("Ecosystem : %s [%s]", ECOSYSTEM::toString(_Form->getEcosystem()).c_str(), ECOSYSTEM::toString(baseForm->getEcosystem()).c_str()); /*log.displayNL("NbPlayers : %i [%i]", _NbPlayers, ???); - log.displayNL("PlayerHpLevel: %d [%d]", _); + log.displayNL("PlayerChaScore1Level: %d [%d]", _); log.displayNL("NbHitToKillPlayer: %d [%d]", _); log.displayNL("AttackLevel : %i [%i]", _AttackLevel, baseForm->getAttackLevel()); log.displayNL("AttackSpeed : %d [%d]", _AttackLatency, baseForm->getAttackLatency()); @@ -462,7 +462,7 @@ void CCreature::displayModifiedAttributes(CEntityId id, NLMISC::CLog &log) log.displayNL("XPLevel : %i [%i]", _XPLevel, baseForm->getXPLevel()); log.displayNL("TauntLevel : %i [%i]", _TauntLevel, baseForm->getTauntLevel()); log.displayNL("XPGainOnCreature : %f [%f]", _XPGainOnCreature, baseForm->getXPGainOnCreature());*/ - log.displayNL("Regen: %f [%f]",_PhysScores._PhysicalScores[SCORES::hit_points].CurrentRegenerate, baseForm->getRegen(SCORES::hit_points)); + log.displayNL("Regen: %f [%f]",_PhysScores._PhysicalScores[SCORES::cha_score1].CurrentRegenerate, baseForm->getRegen(SCORES::cha_score1)); log.displayNL("DodgeAsDefense : %d [%d]", _DodgeAsDefense, baseForm->getDodgeAsDefense()); } } @@ -531,13 +531,13 @@ void CCreature::loadSheetCreature( NLMISC::CSheetId sheetId ) _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _Form->getRegen( i ); } - if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Base == 0 || _PhysScores._PhysicalScores[ SCORES::hit_points ].Current == 0) + if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base == 0 || _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current == 0) { const sint32 score = (sint32) ( (2*_Form->getDefenseLevel()*_Form->getNbPlayers() + 0.5)*(MinDamage + DamageStep * _Form->getDefenseLevel())*0.65 ); - nlwarning("CREATURE : spawning a creature with 0 Hit Points ! (SHEET %s), set the hp to %d", sheetId.toString().c_str(), score); - _PhysScores._PhysicalScores[ SCORES::hit_points ].Base = max(score,sint32(1)); - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = max(score,sint32(1)); - _PhysScores._PhysicalScores[ SCORES::hit_points ].Max = max(score,sint32(1)); + nlwarning("CREATURE : spawning a creature with 0 ChaScore1 ! (SHEET %s), set the ChaScore1 to %d", sheetId.toString().c_str(), score); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base = max(score,sint32(1)); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = max(score,sint32(1)); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Max = max(score,sint32(1)); } /////////////////////////////////////////////////////// @@ -614,7 +614,7 @@ void CCreature::loadSheetCreature( NLMISC::CSheetId sheetId ) // Damage Shield /////////////////////////////////////////////////////// _DamageShieldDamage = _Form->getDamageShieldDamage(); - _DamageShieldHpDrain= _Form->getDamageShieldHpDrain(); + _DamageShieldChaScore1Drain= _Form->getDamageShieldChaScore1Drain(); /////////////////////////////////////////////////////// // defense mode @@ -1724,7 +1724,7 @@ void CCreature::kill(TDataSetRow killerRowId) removeAllSpells(); - _PhysScores._PhysicalScores[SCORES::hit_points].Current = 0; + _PhysScores._PhysicalScores[SCORES::cha_score1].Current = 0; setBars(0); BotDeathReport.Bots.push_back(_EntityRowId); @@ -2046,12 +2046,12 @@ uint32 CCreature::tickUpdate() if( _GodMode || _Invulnerable ) { - if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Current <= 0 ) - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = _PhysScores._PhysicalScores[ SCORES::hit_points ].Base; + if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current <= 0 ) + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base; } // Check if death of entity occurs - if (_PhysScores._PhysicalScores[ SCORES::hit_points ].Current <= 0 && _Mode.getValue().Mode != MBEHAV::DEATH ) + if (_PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current <= 0 && _Mode.getValue().Mode != MBEHAV::DEATH ) { kill(); } @@ -2079,7 +2079,7 @@ uint32 CCreature::tickUpdate() } } - if (currentHp()!=maxHp() && !isDead()) return 12; + if (currentChaScore1()!=maxChaScore1() && !isDead()) return 12; return 24; } // tickUpdate // diff --git a/code/ryzom/server/src/entities_game_service/creature_manager/creature_manager.cpp b/code/ryzom/server/src/entities_game_service/creature_manager/creature_manager.cpp index 9fe263a31..5d3f3d2d6 100644 --- a/code/ryzom/server/src/entities_game_service/creature_manager/creature_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/creature_manager/creature_manager.cpp @@ -184,33 +184,33 @@ void CCreatureCompleteHealImp::callback(const string &, NLNET::TServiceId sid) { H_AUTO(CCreatureCompleteHealImp); - // for each creature, restore full HP + // for each creature, restore full ChaScore1 for ( uint i = 0; i < Entities.size(); ++i ) { CCreature * c = CreatureManager.getCreature( Entities[i] ); if ( c ) { - c->changeCurrentHp( c->maxHp() - c->currentHp() ); + c->changeCurrentChaScore1( c->maxChaScore1() - c->currentChaScore1() ); } } } //-------------------------------------------------------------- -// CChangeCreatureMaxHPImp ::callback() +// CChangeCreatureMaxChaScore1Imp ::callback() //-------------------------------------------------------------- -void CChangeCreatureMaxHPImp::callback(const string &, NLNET::TServiceId sid) +void CChangeCreatureMaxChaScore1Imp::callback(const string &, NLNET::TServiceId sid) { - H_AUTO(CChangeCreatureMaxHPImp); + H_AUTO(CChangeCreatureMaxChaScore1Imp); - // for each creature, restore full HP + // for each creature, restore full ChaScore1 for ( uint i = 0; i < Entities.size(); ++i ) { CCreature * c = CreatureManager.getCreature( Entities[i] ); if ( c ) { - c->getScores()._PhysicalScores[SCORES::hit_points].Max = MaxHp[i]; + c->getScores()._PhysicalScores[SCORES::cha_score1].Max = MaxChaScore1[i]; if (SetFull[i] != 0) - c->changeCurrentHp( c->maxHp() - c->currentHp() ); + c->changeCurrentChaScore1( c->maxChaScore1() - c->currentChaScore1() ); } } } @@ -218,34 +218,34 @@ void CChangeCreatureMaxHPImp::callback(const string &, NLNET::TServiceId sid) //-------------------------------------------------------------- -// CChangeCreatureHPImp ::callback() +// CChangeCreatureChaScore1Imp ::callback() //-------------------------------------------------------------- -void CChangeCreatureHPImp::callback(const string &, NLNET::TServiceId sid) +void CChangeCreatureChaScore1Imp::callback(const string &, NLNET::TServiceId sid) { - H_AUTO(CChangeCreatureHPImp); + H_AUTO(CChangeCreatureChaScore1Imp); uint16 size = (uint16)Entities.size(); - if (Entities.size() != DeltaHp.size() ) + if (Entities.size() != DeltaChaScore1.size() ) { - nlwarning("Entities.size() != DeltaHp.size()"); + nlwarning("Entities.size() != DeltaChaScore1.size()"); - size = (uint16)min(Entities.size(),DeltaHp.size()); + size = (uint16)min(Entities.size(),DeltaChaScore1.size()); } - // for each creature, change HP + // for each creature, change ChaScore1 for ( uint i = 0; i < size; ++i ) { CCreature * c = CreatureManager.getCreature( Entities[i] ); if ( c ) { - if( c->currentHp()+DeltaHp[i] > c->maxHp() ) + if( c->currentChaScore1()+DeltaChaScore1[i] > c->maxChaScore1() ) { - // clamp hp - c->changeCurrentHp( c->maxHp() - c->currentHp() ); + // clamp ChaScore1 + c->changeCurrentChaScore1( c->maxChaScore1() - c->currentChaScore1() ); } else { - c->changeCurrentHp( DeltaHp[i] ); + c->changeCurrentChaScore1( DeltaChaScore1[i] ); } } } diff --git a/code/ryzom/server/src/entities_game_service/creature_manager/creature_manager.h b/code/ryzom/server/src/entities_game_service/creature_manager/creature_manager.h index ccb9468f0..9b8d9e4ad 100644 --- a/code/ryzom/server/src/entities_game_service/creature_manager/creature_manager.h +++ b/code/ryzom/server/src/entities_game_service/creature_manager/creature_manager.h @@ -72,18 +72,18 @@ public: }; /** - * Implementation of the set Max HP message for creatures + * Implementation of the set Max ChaScore1 message for creatures */ -class CChangeCreatureMaxHPImp : public CChangeCreatureMaxHPMsg +class CChangeCreatureMaxChaScore1Imp : public CChangeCreatureMaxChaScore1Msg { public: virtual void callback (const std::string &name, NLNET::TServiceId id); }; /** - * Implementation of the change HP message for creatures + * Implementation of the change ChaScore1 message for creatures */ -class CChangeCreatureHPImp : public CChangeCreatureHPMsg +class CChangeCreatureChaScore1Imp : public CChangeCreatureChaScore1Msg { public: virtual void callback (const std::string &name, NLNET::TServiceId id); diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_ai_action.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_ai_action.cpp index 57f4cca12..77ca67ac9 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_ai_action.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_ai_action.cpp @@ -330,8 +330,8 @@ void CSpellParams::serial(class NLMISC::IStream &f) f.serial(CastingTime); f.serial(PostActionTime); f.serial(Stackable); - f.serial(SapCost); - f.serial(HpCost); + f.serial(ChaScore3Cost); + f.serial(ChaScore1Cost); f.serial(SpellParamValue); f.serial(SpellParamValue2); f.serial(SpellPowerFactor); @@ -386,8 +386,8 @@ void CSpellParams::readForm (const UFormElm &root, const NLMISC::CSheetId &sheet else Stackable = false; - root.getValueByName( SapCost, "SapCost" ); - root.getValueByName( HpCost, "HpCost" ); + root.getValueByName( ChaScore3Cost, "ChaScore3Cost" ); + root.getValueByName( ChaScore1Cost, "ChaScore1Cost" ); root.getValueByName(SpellLevel, "SpellLevel"); if (root.getValueByName( value, "Skill" )) diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_ai_action.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_ai_action.h index 69f2eede9..4600e7b11 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_ai_action.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_ai_action.h @@ -138,7 +138,7 @@ struct CCombatParams EffectTime = 0; EffectUpdateFrequency = 10; EffectDamageType = DMGTYPE::UNDEFINED; - EffectAffectedScore = SCORES::hit_points; + EffectAffectedScore = SCORES::cha_score1; Critic = 0.0f; Behaviour = MBEHAV::UNKNOWN_BEHAVIOUR; ArmorFactor = 1.0f; @@ -193,10 +193,10 @@ struct CSpellParams { CastingTime = 0; PostActionTime = 0; - SapCost = 0; - HpCost = 0; + ChaScore3Cost = 0; + ChaScore1Cost = 0; Skill = SKILLS::unknown; - AffectedScore = SCORES::hit_points; + AffectedScore = SCORES::cha_score1; DamageType = DMGTYPE::UNDEFINED; SpellParamValue = 0; SpellParamValue2 = 0; @@ -215,8 +215,8 @@ struct CSpellParams NLMISC::TGameCycle CastingTime; // in ticks NLMISC::TGameCycle PostActionTime; // in ticks SKILLS::ESkills Skill; - uint16 SapCost; - uint16 HpCost; + uint16 ChaScore3Cost; + uint16 ChaScore1Cost; SCORES::TScores AffectedScore; float SpellParamValue; float SpellParamValue2; diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.cpp index 92356286a..77a580dcc 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.cpp @@ -644,35 +644,35 @@ void addParam(const std::string ¶mStr, std::vector &Par /************************************************************************/ /* General Params */ /************************************************************************/ - case TBrickParam::SAP: - // $*STRUCT CSBrickParamSap TBrickParam::SAP - // $*-i unsigned Sap=0 // quantity of SAP to use - Params.push_back(new CSBrickParamSap(tail)); + case TBrickParam::ChaScore3: + // $*STRUCT CSBrickParamChaScore3 TBrickParam::ChaScore3 + // $*-i unsigned ChaScore3=0 // quantity of ChaScore3 to use + Params.push_back(new CSBrickParamChaScore3(tail)); break; - case TBrickParam::HP: - // $*STRUCT CSBrickParamHp TBrickParam::HP - // $*-i unsigned Hp=0 // quantity of HP to use - Params.push_back(new CSBrickParamHp(tail)); + case TBrickParam::ChaScore1: + // $*STRUCT CSBrickParamChaScore1 TBrickParam::ChaScore1 + // $*-i unsigned ChaScore1=0 // quantity of ChaScore1 to use + Params.push_back(new CSBrickParamChaScore1(tail)); break; - case TBrickParam::STA: - // $*STRUCT CSBrickParamSta TBrickParam::STA - // $*-i unsigned Sta=0 // quantity of STA to use - Params.push_back(new CSBrickParamSta(tail)); + case TBrickParam::ChaScore2: + // $*STRUCT CSBrickParamChaScore2 TBrickParam::ChaScore2 + // $*-i unsigned ChaScore2=0 // quantity of ChaScore2 to use + Params.push_back(new CSBrickParamChaScore2(tail)); break; - case TBrickParam::STA_WEIGHT_FACTOR: - // $*STRUCT CSBrickParamStaWeightFactor TBrickParam::STA_WEIGHT_FACTOR - // $*-i float StaFactor=0 // quantity of STA FACTOR of WEIGHT to use - // $*-i unsigned StaConst=0 // quantity of STA Constante to use, used STA = StaFactor * (weight of equipped weapons) + StaConst - Params.push_back(new CSBrickParamStaWeightFactor(tail)); + case TBrickParam::ChaScore2_WEIGHT_FACTOR: + // $*STRUCT CSBrickParamChaScore2WeightFactor TBrickParam::ChaScore2_WEIGHT_FACTOR + // $*-i float ChaScore2Factor=0 // quantity of ChaScore2 FACTOR of WEIGHT to use + // $*-i unsigned ChaScore2Const=0 // quantity of ChaScore2 Constante to use, used ChaScore2 = ChaScore2Factor * (weight of equipped weapons) + ChaScore2Const + Params.push_back(new CSBrickParamChaScore2WeightFactor(tail)); break; - case TBrickParam::FOCUS: - // $*STRUCT CSBrickParamFocus TBrickParam::FOCUS - // $*-i unsigned Focus=0 // quantity of FOCUS to use - Params.push_back(new CSBrickParamFocus(tail)); + case TBrickParam::ChaScore4: + // $*STRUCT CSBrickParamChaScore4 TBrickParam::ChaScore4 + // $*-i unsigned ChaScore4=0 // quantity of ChaScore4 to use + Params.push_back(new CSBrickParamChaScore4(tail)); break; case TBrickParam::SET_BEHAVIOUR: @@ -705,19 +705,19 @@ void addParam(const std::string ¶mStr, std::vector &Par } break; - case TBrickParam::STA_LOSS_FACTOR: + case TBrickParam::ChaScore2_LOSS_FACTOR: { - // $*STRUCT CSBrickParamStaLossFactor TBrickParam::STA_LOSS_FACTOR - // $*-f float MinFactor = 0.0 // min factor of damage also applied to stamina - // $*-f float MaxFactor = 0.0 // max factor of damage also applied to stamina - Params.push_back(new CSBrickParamStaLossFactor(tail)); + // $*STRUCT CSBrickParamChaScore2LossFactor TBrickParam::ChaScore2_LOSS_FACTOR + // $*-f float MinFactor = 0.0 // min factor of damage also applied to ChaScore2 + // $*-f float MaxFactor = 0.0 // max factor of damage also applied to ChaScore2 + Params.push_back(new CSBrickParamChaScore2LossFactor(tail)); } break; case TBrickParam::DEBUFF_REGEN: { // $*STRUCT CSBrickParamDebuffRegen TBrickParam::DEBUFF_REGEN - // $*-s std::string Score // affected score regen (Sap, Stamina, HitPoints, Focus) + // $*-s std::string Score // affected score regen (ChaScore3, ChaScore2, ChaScore1, ChaScore4) // $*-f float Duration = 0.0 // duration in seconds // $*-f float MinFactor = 0.0 // min factor of regen debuff // $*-f float MaxFactor = 0.0 // max factor of regen debuff @@ -725,12 +725,12 @@ void addParam(const std::string ¶mStr, std::vector &Par } break; - case TBrickParam::SAP_LOSS_FACTOR: + case TBrickParam::ChaScore3_LOSS_FACTOR: { - // $*STRUCT CSBrickParamSapLossFactor TBrickParam::SAP_LOSS_FACTOR - // $*-f float MinFactor = 0.0 // min factor of damage also applied to sap - // $*-f float MaxFactor = 0.0 // max factor of damage also applied to sap - Params.push_back(new CSBrickParamSapLossFactor(tail)); + // $*STRUCT CSBrickParamChaScore3LossFactor TBrickParam::ChaScore3_LOSS_FACTOR + // $*-f float MinFactor = 0.0 // min factor of damage also applied to ChaScore3 + // $*-f float MaxFactor = 0.0 // max factor of damage also applied to ChaScore3 + Params.push_back(new CSBrickParamChaScore3LossFactor(tail)); } break; @@ -984,16 +984,16 @@ void addParam(const std::string ¶mStr, std::vector &Par case TBrickParam::MA_DMG: // $*STRUCT CSBrickParamMagicDmg TBrickParam::MA_DMG - // $*-i sint32 Hp = 0 // fixed modifier on energy - // $*-i sint32 Sap = 0 // fixed modifier on energy - // $*-i sint32 Sta = 0 // fixed modifier on energy + // $*-i sint32 ChaScore1 = 0 // fixed modifier on energy + // $*-i sint32 ChaScore3 = 0 // fixed modifier on energy + // $*-i sint32 ChaScore2 = 0 // fixed modifier on energy Params.push_back(new CSBrickParamMagicDmg(tail)); break; case TBrickParam::MA_HEAL: // $*STRUCT CSBrickParamMagicHeal TBrickParam::MA_HEAL - // $*-i sint32 Hp = 0 // fixed modifier on energy - // $*-i sint32 Sap = 0 // fixed modifier on energy - // $*-i sint32 Sta = 0 // fixed modifier on energy + // $*-i sint32 ChaScore1 = 0 // fixed modifier on energy + // $*-i sint32 ChaScore3 = 0 // fixed modifier on energy + // $*-i sint32 ChaScore2 = 0 // fixed modifier on energy Params.push_back(new CSBrickParamMagicHeal(tail)); break; case TBrickParam::MA_RANGE: @@ -1054,25 +1054,25 @@ void addParam(const std::string ¶mStr, std::vector &Par // $*-i uint32 Recommended Params.push_back(new CSBrickParamCraftRecommended(tail)); break; - case TBrickParam::CR_HP: - // $*STRUCT CSBrickParamCraftHP TBrickParam::CR_HP - // $*-i sint32 HitPoint - Params.push_back(new CSBrickParamCraftHP(tail)); + case TBrickParam::CR_ChaScore1: + // $*STRUCT CSBrickParamCraftChaScore1 TBrickParam::CR_ChaScore1 + // $*-i sint32 ChaScore1 + Params.push_back(new CSBrickParamCraftChaScore1(tail)); break; - case TBrickParam::CR_SAP: - // $*STRUCT CSBrickParamCraftSap TBrickParam::CR_SAP - // $*-i sint32 Sap - Params.push_back(new CSBrickParamCraftSap(tail)); + case TBrickParam::CR_ChaScore3: + // $*STRUCT CSBrickParamCraftChaScore3 TBrickParam::CR_ChaScore3 + // $*-i sint32 ChaScore3 + Params.push_back(new CSBrickParamCraftChaScore3(tail)); break; - case TBrickParam::CR_STA: - // $*STRUCT CSBrickParamCraftSta TBrickParam::CR_STA - // $*-i sint32 Stamina - Params.push_back(new CSBrickParamCraftSta(tail)); + case TBrickParam::CR_ChaScore2: + // $*STRUCT CSBrickParamCraftChaScore2 TBrickParam::CR_ChaScore2 + // $*-i sint32 ChaScore2 + Params.push_back(new CSBrickParamCraftChaScore2(tail)); break; - case TBrickParam::CR_FOCUS: - // $*STRUCT CSBrickParamCraftFocus TBrickParam::CR_FOCUS - // $*-i uint32 Focus - Params.push_back(new CSBrickParamCraftFocus(tail)); + case TBrickParam::CR_ChaScore4: + // $*STRUCT CSBrickParamCraftChaScore4 TBrickParam::CR_ChaScore4 + // $*-i uint32 ChaScore4 + Params.push_back(new CSBrickParamCraftChaScore4(tail)); break; case TBrickParam::CR_QUALITY: // $*STRUCT CSBrickParamCraftQuality TBrickParam::CR_QUALITY @@ -1299,64 +1299,64 @@ void addParam(const std::string ¶mStr, std::vector &Par Params.push_back(new CSBrickParamShielding(tail)); break; - case TBrickParam::SP_LIFE_AURA: - // $*STRUCT CSBrickParamLifeAura TBrickParam::SP_LIFE_AURA + case TBrickParam::SP_ChaScore1_AURA: + // $*STRUCT CSBrickParamChaScore1Aura TBrickParam::SP_ChaScore1_AURA // $*-i uint16 RegenMod // regen modifier (in %) // $*-f float Duration // duration in seconds // $*-f float Radius // aura radius in meters - // $*-f float TargetDisableTime // disable life aura for x seconds on targets - // $*-f float UserDisableTime // disable life aura for x seconds on user - Params.push_back(new CSBrickParamLifeAura(tail)); + // $*-f float TargetDisableTime // disable ChaScore1 aura for x seconds on targets + // $*-f float UserDisableTime // disable ChaScore1 aura for x seconds on user + Params.push_back(new CSBrickParamChaScore1Aura(tail)); break; - case TBrickParam::SP_LIFE_AURA2: - // $*STRUCT CSBrickParamLifeAura2 TBrickParam::SP_LIFE_AURA2 + case TBrickParam::SP_ChaScore1_AURA2: + // $*STRUCT CSBrickParamChaScore1Aura2 TBrickParam::SP_ChaScore1_AURA2 // $*-i uint16 RegenMod // regen modifier (in %) proportionally to item level // $*-f float Duration // duration in seconds // $*-f float Radius // aura radius in meters - // $*-f float TargetDisableTime // disable life aura for x seconds on targets - // $*-f float UserDisableTime // disable life aura for x seconds on user - Params.push_back(new CSBrickParamLifeAura2(tail)); + // $*-f float TargetDisableTime // disable ChaScore1 aura for x seconds on targets + // $*-f float UserDisableTime // disable ChaScore1 aura for x seconds on user + Params.push_back(new CSBrickParamChaScore1Aura2(tail)); break; - case TBrickParam::SP_STAMINA_AURA: - // $*STRUCT CSBrickParamStaminaAura TBrickParam::SP_STAMINA_AURA + case TBrickParam::SP_ChaScore2_AURA: + // $*STRUCT CSBrickParamChaScore2Aura TBrickParam::SP_ChaScore2_AURA // $*-i uint16 RegenMod // regen modifier (in %) // $*-f float Duration // duration in seconds // $*-f float Radius // aura radius in meters - // $*-f float TargetDisableTime // disable life aura for x seconds on targets - // $*-f float UserDisableTime // disable life aura for x seconds on user - Params.push_back(new CSBrickParamStaminaAura(tail)); + // $*-f float TargetDisableTime // disable ChaScore2 aura for x seconds on targets + // $*-f float UserDisableTime // disable ChaScore2 aura for x seconds on user + Params.push_back(new CSBrickParamChaScore2Aura(tail)); break; - case TBrickParam::SP_STAMINA_AURA2: - // $*STRUCT CSBrickParamStaminaAura2 TBrickParam::SP_STAMINA_AURA2 + case TBrickParam::SP_ChaScore2_AURA2: + // $*STRUCT CSBrickParamChaScore2Aura2 TBrickParam::SP_ChaScore2_AURA2 // $*-i uint16 RegenMod // regen modifier (in %) proportionally to item level // $*-f float Duration // duration in seconds // $*-f float Radius // aura radius in meters - // $*-f float TargetDisableTime // disable life aura for x seconds on targets - // $*-f float UserDisableTime // disable life aura for x seconds on user - Params.push_back(new CSBrickParamStaminaAura2(tail)); + // $*-f float TargetDisableTime // disable ChaScore2 aura for x seconds on targets + // $*-f float UserDisableTime // disable ChaScore2 aura for x seconds on user + Params.push_back(new CSBrickParamChaScore2Aura2(tail)); break; - case TBrickParam::SP_SAP_AURA: - // $*STRUCT CSBrickParamSapAura TBrickParam::SP_SAP_AURA + case TBrickParam::SP_ChaScore3_AURA: + // $*STRUCT CSBrickParamChaScore3Aura TBrickParam::SP_ChaScore3_AURA // $*-i uint16 RegenMod // regen modifier (in %) // $*-f float Duration // duration in seconds // $*-f float Radius // aura radius in meters - // $*-f float TargetDisableTime // disable life aura for x seconds on targets - // $*-f float UserDisableTime // disable life aura for x seconds on user - Params.push_back(new CSBrickParamSapAura(tail)); + // $*-f float TargetDisableTime // disable ChaScore3 aura for x seconds on targets + // $*-f float UserDisableTime // disable ChaScore3 aura for x seconds on user + Params.push_back(new CSBrickParamChaScore3Aura(tail)); break; - case TBrickParam::SP_SAP_AURA2: - // $*STRUCT CSBrickParamSapAura2 TBrickParam::SP_SAP_AURA2 + case TBrickParam::SP_ChaScore3_AURA2: + // $*STRUCT CSBrickParamChaScore3Aura2 TBrickParam::SP_ChaScore3_AURA2 // $*-i uint16 RegenMod // regen modifier (in %) proportionally to item level // $*-f float Duration // duration in seconds // $*-f float Radius // aura radius in meters - // $*-f float TargetDisableTime // disable life aura for x seconds on targets - // $*-f float UserDisableTime // disable life aura for x seconds on user - Params.push_back(new CSBrickParamSapAura2(tail)); + // $*-f float TargetDisableTime // disable ChaScore3 aura for x seconds on targets + // $*-f float UserDisableTime // disable ChaScore3 aura for x seconds on user + Params.push_back(new CSBrickParamChaScore3Aura2(tail)); break; case TBrickParam::SP_SPEEDING_UP: @@ -1501,7 +1501,7 @@ void addParam(const std::string ¶mStr, std::vector &Par // $*-i sint32 HealValue // value added to affected score // $*-f float HealFactorValue // value added to affected score in % of max target score // $*-f float DisableTime // disable power for x seconds - // $*-s std::string PowerType // type of power (Heal, HealHpC ...) + // $*-s std::string PowerType // type of power (Heal, HealChaScore1C ...) Params.push_back(new CSBrickParamHeal(tail)); break; @@ -1744,10 +1744,10 @@ void CStaticBrick::loadFaber( const UFormElm &root, const CSheetId &sheetId ) root.getValueByName( Faber->DefensiveAfflictionCastingTimeFactor, "faber.Defensive Affliction Casting Time Factor" ); root.getValueByName( Faber->DefensiveAfflictionPowerFactor, "faber.Defensive Affliction Power Factor" ); - root.getValueByName( Faber->HpBonusPerLevel, "faber.HpBonusPerLevel" ); - root.getValueByName( Faber->SapBonusPerLevel, "faber.SapBonusPerLevel" ); - root.getValueByName( Faber->StaBonusPerLevel, "faber.StaBonusPerLevel" ); - root.getValueByName( Faber->FocusBonusPerLevel, "faber.FocusBonusPerLevel" ); + root.getValueByName( Faber->ChaScore1BonusPerLevel, "faber.ChaScore1BonusPerLevel" ); + root.getValueByName( Faber->ChaScore3BonusPerLevel, "faber.ChaScore3BonusPerLevel" ); + root.getValueByName( Faber->ChaScore2BonusPerLevel, "faber.ChaScore2BonusPerLevel" ); + root.getValueByName( Faber->ChaScore4BonusPerLevel, "faber.ChaScore4BonusPerLevel" ); root.getValueByName( Faber->AllowPartialSuccess, "faber.AllowPartialSuccess" ); diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.cpp.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.cpp.h index 2a2946bcf..f933a925b 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.cpp.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.cpp.h @@ -24,18 +24,18 @@ class TBrickParam public: enum TValueType { - SAP, - HP, - STA, - STA_WEIGHT_FACTOR, - FOCUS, + ChaScore3, + ChaScore1, + ChaScore2, + ChaScore2_WEIGHT_FACTOR, + ChaScore4, SET_BEHAVIOUR, DEFINE_FLAG, BYPASS_CHECK, LATENCY_FACTOR, - STA_LOSS_FACTOR, + ChaScore2_LOSS_FACTOR, DEBUFF_REGEN, - SAP_LOSS_FACTOR, + ChaScore3_LOSS_FACTOR, AIM, ATT_SKILL_MOD, DEFENSE_MOD, @@ -78,10 +78,10 @@ public: MA_VAMPIRISE, MA_VAMPIRISE_RATIO, CR_RECOMMENDED, - CR_HP, - CR_SAP, - CR_STA, - CR_FOCUS, + CR_ChaScore1, + CR_ChaScore3, + CR_ChaScore2, + CR_ChaScore4, CR_QUALITY, CR_DURABILITY, CR_DAMAGE, @@ -122,12 +122,12 @@ public: FG_ITEMPART_FILT, SP_TAUNT, SP_SHIELDING, - SP_LIFE_AURA, - SP_LIFE_AURA2, - SP_STAMINA_AURA, - SP_STAMINA_AURA2, - SP_SAP_AURA, - SP_SAP_AURA2, + SP_ChaScore1_AURA, + SP_ChaScore1_AURA2, + SP_ChaScore2_AURA, + SP_ChaScore2_AURA2, + SP_ChaScore3_AURA, + SP_ChaScore3_AURA2, SP_SPEEDING_UP, SP_INVULNERABILITY, SP_MELEE_PROTECTION_AURA, @@ -203,18 +203,18 @@ public: if (copyOfStr[i]>='A' && copyOfStr[i]<='Z') copyOfStr[i]^=('A'^'a'); - if (copyOfStr=="sap") {_Value=SAP; return *this;} - if (copyOfStr=="hp") {_Value=HP; return *this;} - if (copyOfStr=="sta") {_Value=STA; return *this;} - if (copyOfStr=="sta_weight_factor") {_Value=STA_WEIGHT_FACTOR; return *this;} - if (copyOfStr=="focus") {_Value=FOCUS; return *this;} + if (copyOfStr=="ChaScore3") {_Value=ChaScore3; return *this;} + if (copyOfStr=="ChaScore1") {_Value=ChaScore1; return *this;} + if (copyOfStr=="ChaScore2") {_Value=ChaScore2; return *this;} + if (copyOfStr=="ChaScore2_weight_factor") {_Value=ChaScore2_WEIGHT_FACTOR; return *this;} + if (copyOfStr=="ChaScore4") {_Value=ChaScore4; return *this;} if (copyOfStr=="set_behaviour") {_Value=SET_BEHAVIOUR; return *this;} if (copyOfStr=="define_flag") {_Value=DEFINE_FLAG; return *this;} if (copyOfStr=="bypass_check") {_Value=BYPASS_CHECK; return *this;} if (copyOfStr=="latency_factor") {_Value=LATENCY_FACTOR; return *this;} - if (copyOfStr=="sta_loss_factor") {_Value=STA_LOSS_FACTOR; return *this;} + if (copyOfStr=="ChaScore2_loss_factor") {_Value=ChaScore2_LOSS_FACTOR; return *this;} if (copyOfStr=="debuff_regen") {_Value=DEBUFF_REGEN; return *this;} - if (copyOfStr=="sap_loss_factor") {_Value=SAP_LOSS_FACTOR; return *this;} + if (copyOfStr=="ChaScore3_loss_factor") {_Value=ChaScore3_LOSS_FACTOR; return *this;} if (copyOfStr=="aim") {_Value=AIM; return *this;} if (copyOfStr=="att_skill_mod") {_Value=ATT_SKILL_MOD; return *this;} if (copyOfStr=="defense_mod") {_Value=DEFENSE_MOD; return *this;} @@ -257,10 +257,10 @@ public: if (copyOfStr=="ma_vampirise") {_Value=MA_VAMPIRISE; return *this;} if (copyOfStr=="ma_vampirise_ratio") {_Value=MA_VAMPIRISE_RATIO; return *this;} if (copyOfStr=="cr_recommended") {_Value=CR_RECOMMENDED; return *this;} - if (copyOfStr=="cr_hp") {_Value=CR_HP; return *this;} - if (copyOfStr=="cr_sap") {_Value=CR_SAP; return *this;} - if (copyOfStr=="cr_sta") {_Value=CR_STA; return *this;} - if (copyOfStr=="cr_focus") {_Value=CR_FOCUS; return *this;} + if (copyOfStr=="cr_ChaScore1") {_Value=CR_ChaScore1; return *this;} + if (copyOfStr=="cr_ChaScore3") {_Value=CR_ChaScore3; return *this;} + if (copyOfStr=="cr_ChaScore2") {_Value=CR_ChaScore2; return *this;} + if (copyOfStr=="cr_ChaScore4") {_Value=CR_ChaScore4; return *this;} if (copyOfStr=="cr_quality") {_Value=CR_QUALITY; return *this;} if (copyOfStr=="cr_durability") {_Value=CR_DURABILITY; return *this;} if (copyOfStr=="cr_damage") {_Value=CR_DAMAGE; return *this;} @@ -301,12 +301,12 @@ public: if (copyOfStr=="fg_itempart_filt") {_Value=FG_ITEMPART_FILT; return *this;} if (copyOfStr=="sp_taunt") {_Value=SP_TAUNT; return *this;} if (copyOfStr=="sp_shielding") {_Value=SP_SHIELDING; return *this;} - if (copyOfStr=="sp_life_aura") {_Value=SP_LIFE_AURA; return *this;} - if (copyOfStr=="sp_life_aura2") {_Value=SP_LIFE_AURA2; return *this;} - if (copyOfStr=="sp_stamina_aura") {_Value=SP_STAMINA_AURA; return *this;} - if (copyOfStr=="sp_stamina_aura2") {_Value=SP_STAMINA_AURA2; return *this;} - if (copyOfStr=="sp_sap_aura") {_Value=SP_SAP_AURA; return *this;} - if (copyOfStr=="sp_sap_aura2") {_Value=SP_SAP_AURA2; return *this;} + if (copyOfStr=="sp_ChaScore1_aura") {_Value=SP_ChaScore1_AURA; return *this;} + if (copyOfStr=="sp_ChaScore1_aura2") {_Value=SP_ChaScore1_AURA2; return *this;} + if (copyOfStr=="sp_ChaScore2_aura") {_Value=SP_ChaScore2_AURA; return *this;} + if (copyOfStr=="sp_ChaScore2_aura2") {_Value=SP_ChaScore2_AURA2; return *this;} + if (copyOfStr=="sp_ChaScore3_aura") {_Value=SP_ChaScore3_AURA; return *this;} + if (copyOfStr=="sp_ChaScore3_aura2") {_Value=SP_ChaScore3_AURA2; return *this;} if (copyOfStr=="sp_speeding_up") {_Value=SP_SPEEDING_UP; return *this;} if (copyOfStr=="sp_invulnerability") {_Value=SP_INVULNERABILITY; return *this;} if (copyOfStr=="sp_melee_protection_aura") {_Value=SP_MELEE_PROTECTION_AURA; return *this;} @@ -377,24 +377,24 @@ private: TValueType _Value; }; -struct CSBrickParamSap : public TBrickParam::IId +struct CSBrickParamChaScore3 : public TBrickParam::IId { - // quantity of SAP to use - unsigned Sap; + // quantity of ChaScore3 to use + unsigned ChaScore3; - CSBrickParamSap(): - Sap(0) + CSBrickParamChaScore3(): + ChaScore3(0) { - _Id = TBrickParam::SAP; + _Id = TBrickParam::ChaScore3; } - CSBrickParamSap(const std::string&str) + CSBrickParamChaScore3(const std::string&str) { - *this=CSBrickParamSap(); + *this=CSBrickParamChaScore3(); *this=str; } - const CSBrickParamSap& operator=(const std::string& input) + const CSBrickParamChaScore3& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -403,31 +403,31 @@ struct CSBrickParamSap : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Sap); + NLMISC::fromString(args[0], ChaScore3); return *this; } }; -struct CSBrickParamHp : public TBrickParam::IId +struct CSBrickParamChaScore1 : public TBrickParam::IId { - // quantity of HP to use - unsigned Hp; + // quantity of ChaScore1 to use + unsigned ChaScore1; - CSBrickParamHp(): - Hp(0) + CSBrickParamChaScore1(): + ChaScore1(0) { - _Id = TBrickParam::HP; + _Id = TBrickParam::ChaScore1; } - CSBrickParamHp(const std::string&str) + CSBrickParamChaScore1(const std::string&str) { - *this=CSBrickParamHp(); + *this=CSBrickParamChaScore1(); *this=str; } - const CSBrickParamHp& operator=(const std::string& input) + const CSBrickParamChaScore1& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -436,31 +436,31 @@ struct CSBrickParamHp : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Hp); + NLMISC::fromString(args[0], ChaScore1); return *this; } }; -struct CSBrickParamSta : public TBrickParam::IId +struct CSBrickParamChaScore2 : public TBrickParam::IId { - // quantity of STA to use - unsigned Sta; + // quantity of ChaScore2 to use + unsigned ChaScore2; - CSBrickParamSta(): - Sta(0) + CSBrickParamChaScore2(): + ChaScore2(0) { - _Id = TBrickParam::STA; + _Id = TBrickParam::ChaScore2; } - CSBrickParamSta(const std::string&str) + CSBrickParamChaScore2(const std::string&str) { - *this=CSBrickParamSta(); + *this=CSBrickParamChaScore2(); *this=str; } - const CSBrickParamSta& operator=(const std::string& input) + const CSBrickParamChaScore2& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -469,35 +469,35 @@ struct CSBrickParamSta : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Sta); + NLMISC::fromString(args[0], ChaScore2); return *this; } }; -struct CSBrickParamStaWeightFactor : public TBrickParam::IId +struct CSBrickParamChaScore2WeightFactor : public TBrickParam::IId { - // STA factor of weight to use - float StaFactor; + // ChaScore2 factor of weight to use + float ChaScore2Factor; - // STA constante used - unsigned StaConst; + // ChaScore2 constante used + unsigned ChaScore2Const; - CSBrickParamStaWeightFactor(): - StaFactor(0.0f), - StaConst(0) + CSBrickParamChaScore2WeightFactor(): + ChaScore2Factor(0.0f), + ChaScore2Const(0) { - _Id = TBrickParam::STA_WEIGHT_FACTOR; + _Id = TBrickParam::ChaScore2_WEIGHT_FACTOR; } - CSBrickParamStaWeightFactor(const std::string&str) + CSBrickParamChaScore2WeightFactor(const std::string&str) { - *this=CSBrickParamStaWeightFactor(); + *this=CSBrickParamChaScore2WeightFactor(); *this=str; } - const CSBrickParamStaWeightFactor& operator=(const std::string& input) + const CSBrickParamChaScore2WeightFactor& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -506,32 +506,32 @@ struct CSBrickParamStaWeightFactor : public TBrickParam::IId return *this; ParsedOk=true; - StaFactor=(float)atof(args[0].c_str()); - NLMISC::fromString(args[1], StaConst); + ChaScore2Factor=(float)atof(args[0].c_str()); + NLMISC::fromString(args[1], ChaScore2Const); return *this; } }; -struct CSBrickParamFocus : public TBrickParam::IId +struct CSBrickParamChaScore4 : public TBrickParam::IId { - // quantity of FOCUS to use - unsigned Focus; + // quantity of ChaScore4 to use + unsigned ChaScore4; - CSBrickParamFocus(): - Focus(0) + CSBrickParamChaScore4(): + ChaScore4(0) { - _Id = TBrickParam::FOCUS; + _Id = TBrickParam::ChaScore4; } - CSBrickParamFocus(const std::string&str) + CSBrickParamChaScore4(const std::string&str) { - *this=CSBrickParamFocus(); + *this=CSBrickParamChaScore4(); *this=str; } - const CSBrickParamFocus& operator=(const std::string& input) + const CSBrickParamChaScore4& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -540,7 +540,7 @@ struct CSBrickParamFocus : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Focus); + NLMISC::fromString(args[0], ChaScore4); return *this; } @@ -683,27 +683,27 @@ struct CSBrickParamLatencyFactor : public TBrickParam::IId }; -struct CSBrickParamStaLossFactor : public TBrickParam::IId +struct CSBrickParamChaScore2LossFactor : public TBrickParam::IId { - // min factor of damage also applied to stamina + // min factor of damage also applied to ChaScore2 float MinFactor; - // max factor of damage also applied to stamina + // max factor of damage also applied to ChaScore2 float MaxFactor; - CSBrickParamStaLossFactor(): + CSBrickParamChaScore2LossFactor(): MinFactor(0.0), MaxFactor(0.0) { - _Id = TBrickParam::STA_LOSS_FACTOR; + _Id = TBrickParam::ChaScore2_LOSS_FACTOR; } - CSBrickParamStaLossFactor(const std::string&str) + CSBrickParamChaScore2LossFactor(const std::string&str) { - *this=CSBrickParamStaLossFactor(); + *this=CSBrickParamChaScore2LossFactor(); *this=str; } - const CSBrickParamStaLossFactor& operator=(const std::string& input) + const CSBrickParamChaScore2LossFactor& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -722,7 +722,7 @@ struct CSBrickParamStaLossFactor : public TBrickParam::IId struct CSBrickParamDebuffRegen : public TBrickParam::IId { - // affected score regen (Sap, Stamina, HitPoints, Focus) + // affected score regen (ChaScore3, ChaScore2, ChaScore1, ChaScore4) std::string Score; // duration in seconds float Duration; @@ -765,27 +765,27 @@ struct CSBrickParamDebuffRegen : public TBrickParam::IId }; -struct CSBrickParamSapLossFactor : public TBrickParam::IId +struct CSBrickParamChaScore3LossFactor : public TBrickParam::IId { - // min factor of damage also applied to sap + // min factor of damage also applied to ChaScore3 float MinFactor; - // max factor of damage also applied to sap + // max factor of damage also applied to ChaScore3 float MaxFactor; - CSBrickParamSapLossFactor(): + CSBrickParamChaScore3LossFactor(): MinFactor(0.0), MaxFactor(0.0) { - _Id = TBrickParam::SAP_LOSS_FACTOR; + _Id = TBrickParam::ChaScore3_LOSS_FACTOR; } - CSBrickParamSapLossFactor(const std::string&str) + CSBrickParamChaScore3LossFactor(const std::string&str) { - *this=CSBrickParamSapLossFactor(); + *this=CSBrickParamChaScore3LossFactor(); *this=str; } - const CSBrickParamSapLossFactor& operator=(const std::string& input) + const CSBrickParamChaScore3LossFactor& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -1899,16 +1899,16 @@ struct CSBrickParamMagicDmgType : public TBrickParam::IId struct CSBrickParamMagicDmg : public TBrickParam::IId { // fixed modifier on energy - sint32 Hp; + sint32 ChaScore1; // fixed modifier on energy - sint32 Sap; + sint32 ChaScore3; // fixed modifier on energy - sint32 Sta; + sint32 ChaScore2; CSBrickParamMagicDmg(): - Hp(0), - Sap(0), - Sta(0) + ChaScore1(0), + ChaScore3(0), + ChaScore2(0) { _Id = TBrickParam::MA_DMG; } @@ -1928,9 +1928,9 @@ struct CSBrickParamMagicDmg : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Hp); - NLMISC::fromString(args[1], Sap); - NLMISC::fromString(args[2], Sta); + NLMISC::fromString(args[0], ChaScore1); + NLMISC::fromString(args[1], ChaScore3); + NLMISC::fromString(args[2], ChaScore2); return *this; } @@ -1940,16 +1940,16 @@ struct CSBrickParamMagicDmg : public TBrickParam::IId struct CSBrickParamMagicHeal : public TBrickParam::IId { // fixed modifier on energy - sint32 Hp; + sint32 ChaScore1; // fixed modifier on energy - sint32 Sap; + sint32 ChaScore3; // fixed modifier on energy - sint32 Sta; + sint32 ChaScore2; CSBrickParamMagicHeal(): - Hp(0), - Sap(0), - Sta(0) + ChaScore1(0), + ChaScore3(0), + ChaScore2(0) { _Id = TBrickParam::MA_HEAL; } @@ -1969,9 +1969,9 @@ struct CSBrickParamMagicHeal : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Hp); - NLMISC::fromString(args[1], Sap); - NLMISC::fromString(args[2], Sta); + NLMISC::fromString(args[0], ChaScore1); + NLMISC::fromString(args[1], ChaScore3); + NLMISC::fromString(args[2], ChaScore2); return *this; } @@ -2312,24 +2312,24 @@ struct CSBrickParamCraftRecommended : public TBrickParam::IId }; -struct CSBrickParamCraftHP : public TBrickParam::IId +struct CSBrickParamCraftChaScore1 : public TBrickParam::IId { - sint32 HitPoint; + sint32 ChaScore1; - CSBrickParamCraftHP(): - HitPoint() + CSBrickParamCraftChaScore1(): + ChaScore1() { - _Id = TBrickParam::CR_HP; + _Id = TBrickParam::CR_ChaScore1; } - CSBrickParamCraftHP(const std::string&str) + CSBrickParamCraftChaScore1(const std::string&str) { - *this=CSBrickParamCraftHP(); + *this=CSBrickParamCraftChaScore1(); *this=str; } - const CSBrickParamCraftHP& operator=(const std::string& input) + const CSBrickParamCraftChaScore1& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -2338,31 +2338,31 @@ struct CSBrickParamCraftHP : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], HitPoint); + NLMISC::fromString(args[0], ChaScore1); return *this; } }; -struct CSBrickParamCraftSap : public TBrickParam::IId +struct CSBrickParamCraftChaScore3 : public TBrickParam::IId { - sint32 Sap; + sint32 ChaScore3; - CSBrickParamCraftSap(): - Sap() + CSBrickParamCraftChaScore3(): + ChaScore3() { - _Id = TBrickParam::CR_SAP; + _Id = TBrickParam::CR_ChaScore3; } - CSBrickParamCraftSap(const std::string&str) + CSBrickParamCraftChaScore3(const std::string&str) { - *this=CSBrickParamCraftSap(); + *this=CSBrickParamCraftChaScore3(); *this=str; } - const CSBrickParamCraftSap& operator=(const std::string& input) + const CSBrickParamCraftChaScore3& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -2371,31 +2371,31 @@ struct CSBrickParamCraftSap : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Sap); + NLMISC::fromString(args[0], ChaScore3); return *this; } }; -struct CSBrickParamCraftSta : public TBrickParam::IId +struct CSBrickParamCraftChaScore2 : public TBrickParam::IId { - sint32 Stamina; + sint32 ChaScore2; - CSBrickParamCraftSta(): - Stamina() + CSBrickParamCraftChaScore2(): + ChaScore2() { - _Id = TBrickParam::CR_STA; + _Id = TBrickParam::CR_ChaScore2; } - CSBrickParamCraftSta(const std::string&str) + CSBrickParamCraftChaScore2(const std::string&str) { - *this=CSBrickParamCraftSta(); + *this=CSBrickParamCraftChaScore2(); *this=str; } - const CSBrickParamCraftSta& operator=(const std::string& input) + const CSBrickParamCraftChaScore2& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -2404,31 +2404,31 @@ struct CSBrickParamCraftSta : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Stamina); + NLMISC::fromString(args[0], ChaScore2); return *this; } }; -struct CSBrickParamCraftFocus : public TBrickParam::IId +struct CSBrickParamCraftChaScore4 : public TBrickParam::IId { - uint32 Focus; + uint32 ChaScore4; - CSBrickParamCraftFocus(): - Focus() + CSBrickParamCraftChaScore4(): + ChaScore4() { - _Id = TBrickParam::CR_FOCUS; + _Id = TBrickParam::CR_ChaScore4; } - CSBrickParamCraftFocus(const std::string&str) + CSBrickParamCraftChaScore4(const std::string&str) { - *this=CSBrickParamCraftFocus(); + *this=CSBrickParamCraftChaScore4(); *this=str; } - const CSBrickParamCraftFocus& operator=(const std::string& input) + const CSBrickParamCraftChaScore4& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -2437,7 +2437,7 @@ struct CSBrickParamCraftFocus : public TBrickParam::IId return *this; ParsedOk=true; - NLMISC::fromString(args[0], Focus); + NLMISC::fromString(args[0], ChaScore4); return *this; } @@ -3800,7 +3800,7 @@ struct CSBrickParamShielding : public TBrickParam::IId }; -struct CSBrickParamLifeAura : public TBrickParam::IId +struct CSBrickParamChaScore1Aura : public TBrickParam::IId { // regen modifier (in %) uint16 RegenMod; @@ -3808,28 +3808,28 @@ struct CSBrickParamLifeAura : public TBrickParam::IId float Duration; // aura radius in meters float Radius; - // disable life aura for x seconds on targets + // disable ChaScore1 aura for x seconds on targets float TargetDisableTime; - // disable life aura for x seconds on user + // disable ChaScore1 aura for x seconds on user float UserDisableTime; - CSBrickParamLifeAura(): + CSBrickParamChaScore1Aura(): RegenMod(), Duration(), Radius(), TargetDisableTime(), UserDisableTime() { - _Id = TBrickParam::SP_LIFE_AURA; + _Id = TBrickParam::SP_ChaScore1_AURA; } - CSBrickParamLifeAura(const std::string&str) + CSBrickParamChaScore1Aura(const std::string&str) { - *this=CSBrickParamLifeAura(); + *this=CSBrickParamChaScore1Aura(); *this=str; } - const CSBrickParamLifeAura& operator=(const std::string& input) + const CSBrickParamChaScore1Aura& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -3849,7 +3849,7 @@ struct CSBrickParamLifeAura : public TBrickParam::IId }; -struct CSBrickParamLifeAura2 : public TBrickParam::IId +struct CSBrickParamChaScore1Aura2 : public TBrickParam::IId { // regen modifier (in %) uint16 RegenMod; @@ -3857,28 +3857,28 @@ struct CSBrickParamLifeAura2 : public TBrickParam::IId float Duration; // aura radius in meters float Radius; - // disable life aura for x seconds on targets + // disable ChaScore1 aura for x seconds on targets float TargetDisableTime; - // disable life aura for x seconds on user + // disable ChaScore1 aura for x seconds on user float UserDisableTime; - CSBrickParamLifeAura2(): + CSBrickParamChaScore1Aura2(): RegenMod(), Duration(), Radius(), TargetDisableTime(), UserDisableTime() { - _Id = TBrickParam::SP_LIFE_AURA2; + _Id = TBrickParam::SP_ChaScore1_AURA2; } - CSBrickParamLifeAura2(const std::string&str) + CSBrickParamChaScore1Aura2(const std::string&str) { - *this=CSBrickParamLifeAura2(); + *this=CSBrickParamChaScore1Aura2(); *this=str; } - const CSBrickParamLifeAura2& operator=(const std::string& input) + const CSBrickParamChaScore1Aura2& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -3897,7 +3897,7 @@ struct CSBrickParamLifeAura2 : public TBrickParam::IId } }; -struct CSBrickParamStaminaAura : public TBrickParam::IId +struct CSBrickParamChaScore2Aura : public TBrickParam::IId { // regen modifier (in %) uint16 RegenMod; @@ -3905,28 +3905,28 @@ struct CSBrickParamStaminaAura : public TBrickParam::IId float Duration; // aura radius in meters float Radius; - // disable life aura for x seconds on targets + // disable ChaScore2 aura for x seconds on targets float TargetDisableTime; - // disable life aura for x seconds on user + // disable ChaScore2 aura for x seconds on user float UserDisableTime; - CSBrickParamStaminaAura(): + CSBrickParamChaScore2Aura(): RegenMod(), Duration(), Radius(), TargetDisableTime(), UserDisableTime() { - _Id = TBrickParam::SP_STAMINA_AURA; + _Id = TBrickParam::SP_ChaScore2_AURA; } - CSBrickParamStaminaAura(const std::string&str) + CSBrickParamChaScore2Aura(const std::string&str) { - *this=CSBrickParamStaminaAura(); + *this=CSBrickParamChaScore2Aura(); *this=str; } - const CSBrickParamStaminaAura& operator=(const std::string& input) + const CSBrickParamChaScore2Aura& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -3945,7 +3945,7 @@ struct CSBrickParamStaminaAura : public TBrickParam::IId } }; -struct CSBrickParamStaminaAura2 : public TBrickParam::IId +struct CSBrickParamChaScore2Aura2 : public TBrickParam::IId { // regen modifier (in %) uint16 RegenMod; @@ -3953,28 +3953,28 @@ struct CSBrickParamStaminaAura2 : public TBrickParam::IId float Duration; // aura radius in meters float Radius; - // disable life aura for x seconds on targets + // disable ChaScore2 aura for x seconds on targets float TargetDisableTime; - // disable life aura for x seconds on user + // disable ChaScore2 aura for x seconds on user float UserDisableTime; - CSBrickParamStaminaAura2(): + CSBrickParamChaScore2Aura2(): RegenMod(), Duration(), Radius(), TargetDisableTime(), UserDisableTime() { - _Id = TBrickParam::SP_STAMINA_AURA2; + _Id = TBrickParam::SP_ChaScore2_AURA2; } - CSBrickParamStaminaAura2(const std::string&str) + CSBrickParamChaScore2Aura2(const std::string&str) { - *this=CSBrickParamStaminaAura2(); + *this=CSBrickParamChaScore2Aura2(); *this=str; } - const CSBrickParamStaminaAura2& operator=(const std::string& input) + const CSBrickParamChaScore2Aura2& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -3992,7 +3992,7 @@ struct CSBrickParamStaminaAura2 : public TBrickParam::IId return *this; } }; -struct CSBrickParamSapAura : public TBrickParam::IId +struct CSBrickParamChaScore3Aura : public TBrickParam::IId { // regen modifier (in %) uint16 RegenMod; @@ -4000,28 +4000,28 @@ struct CSBrickParamSapAura : public TBrickParam::IId float Duration; // aura radius in meters float Radius; - // disable life aura for x seconds on targets + // disable ChaScore3 aura for x seconds on targets float TargetDisableTime; - // disable life aura for x seconds on user + // disable ChaScore3 aura for x seconds on user float UserDisableTime; - CSBrickParamSapAura(): + CSBrickParamChaScore3Aura(): RegenMod(), Duration(), Radius(), TargetDisableTime(), UserDisableTime() { - _Id = TBrickParam::SP_SAP_AURA; + _Id = TBrickParam::SP_ChaScore3_AURA; } - CSBrickParamSapAura(const std::string&str) + CSBrickParamChaScore3Aura(const std::string&str) { - *this=CSBrickParamSapAura(); + *this=CSBrickParamChaScore3Aura(); *this=str; } - const CSBrickParamSapAura& operator=(const std::string& input) + const CSBrickParamChaScore3Aura& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -4040,7 +4040,7 @@ struct CSBrickParamSapAura : public TBrickParam::IId } }; -struct CSBrickParamSapAura2 : public TBrickParam::IId +struct CSBrickParamChaScore3Aura2 : public TBrickParam::IId { // regen modifier (in %) uint16 RegenMod; @@ -4048,28 +4048,28 @@ struct CSBrickParamSapAura2 : public TBrickParam::IId float Duration; // aura radius in meters float Radius; - // disable life aura for x seconds on targets + // disable ChaScore3 aura for x seconds on targets float TargetDisableTime; - // disable life aura for x seconds on user + // disable ChaScore3 aura for x seconds on user float UserDisableTime; - CSBrickParamSapAura2(): + CSBrickParamChaScore3Aura2(): RegenMod(), Duration(), Radius(), TargetDisableTime(), UserDisableTime() { - _Id = TBrickParam::SP_SAP_AURA2; + _Id = TBrickParam::SP_ChaScore3_AURA2; } - CSBrickParamSapAura2(const std::string&str) + CSBrickParamChaScore3Aura2(const std::string&str) { - *this=CSBrickParamSapAura2(); + *this=CSBrickParamChaScore3Aura2(); *this=str; } - const CSBrickParamSapAura2& operator=(const std::string& input) + const CSBrickParamChaScore3Aura2& operator=(const std::string& input) { std::vector args; convertInput(args, input); @@ -4772,7 +4772,7 @@ struct CSBrickParamHeal : public TBrickParam::IId float HealFactorValue; // disable power for x seconds float DisableTime; - // type of power (Heal, HealHpC ...) + // type of power (Heal, HealChaScore1C ...) std::string PowerType; CSBrickParamHeal(): diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.h index 2eef41e0d..0745848af 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_brick.h @@ -169,10 +169,10 @@ public: DefensiveAfflictionCastingTimeFactor = 1.0f; DefensiveAfflictionPowerFactor = 1.0f; - HpBonusPerLevel = 0.0f; - SapBonusPerLevel = 0.0f; - StaBonusPerLevel = 0.0f; - FocusBonusPerLevel = 0.0f; + ChaScore1BonusPerLevel = 0.0f; + ChaScore2BonusPerLevel = 0.0f; + ChaScore3BonusPerLevel = 0.0f; + ChaScore4BonusPerLevel = 0.0f; AllowPartialSuccess= true; } @@ -221,10 +221,10 @@ public: f.serial( DefensiveAfflictionCastingTimeFactor ); f.serial( DefensiveAfflictionPowerFactor ); - f.serial( HpBonusPerLevel ); - f.serial( SapBonusPerLevel ); - f.serial( StaBonusPerLevel ); - f.serial( FocusBonusPerLevel ); + f.serial( ChaScore1BonusPerLevel ); + f.serial( ChaScore2BonusPerLevel ); + f.serial( ChaScore3BonusPerLevel ); + f.serial( ChaScore4BonusPerLevel ); f.serial( AllowPartialSuccess ); @@ -313,10 +313,10 @@ public: float DefensiveAfflictionPowerFactor; /// stats factor - float HpBonusPerLevel; - float SapBonusPerLevel; - float StaBonusPerLevel; - float FocusBonusPerLevel; + float ChaScore1BonusPerLevel; + float ChaScore2BonusPerLevel; + float ChaScore3BonusPerLevel; + float ChaScore4BonusPerLevel; /// Some Plans can Force no Partial Success (instead replace full success) bool AllowPartialSuccess; diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp index 42517c190..773dc6ff5 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp @@ -893,10 +893,10 @@ void loadRawMaterial( UFormElm &root, CStaticItem *item, const CSheetId &sheetId mpFaberParameter->getValueByName( civS, "CraftCivSpec" ); v.CraftCivSpec = ITEM_ORIGIN::stringToEnum( civS ); - mpFaberParameter->getValueByName( v.HpBuff, "HpBuff" ); - mpFaberParameter->getValueByName( v.SapBuff, "SapBuff" ); - mpFaberParameter->getValueByName( v.StaBuff, "StaBuff" ); - mpFaberParameter->getValueByName( v.FocusBuff, "FocusBuff" ); + mpFaberParameter->getValueByName( v.ChaScore1Buff, "ChaScore1Buff" ); + mpFaberParameter->getValueByName( v.ChaScore2Buff, "ChaScore2Buff" ); + mpFaberParameter->getValueByName( v.ChaScore3Buff, "ChaScore3Buff" ); + mpFaberParameter->getValueByName( v.ChaScore3Buff, "ChaScore3Buff" ); item->Mp->MpFaberParameters.push_back( v ); } diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h index 96aae2e98..a81d5502c 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h @@ -524,10 +524,10 @@ public: float DefensiveAfflictionPowerFactor; // armor and jewel buff - sint32 HpBuff; - sint32 SapBuff; - sint32 StaBuff; - sint32 FocusBuff; + sint32 ChaScore1Buff; + sint32 ChaScore2Buff; + sint32 ChaScore3Buff; + sint32 ChaScore4Buff; TMpFaberParameters() { @@ -574,10 +574,10 @@ public: DefensiveAfflictionPowerFactor = 0.0f; // armor and jewel buff - HpBuff = 0; - SapBuff = 0; - StaBuff = 0; - FocusBuff = 0; + ChaScore1Buff = 0; + ChaScore2Buff = 0; + ChaScore3Buff = 0; + ChaScore4Buff = 0; } inline void serial(class NLMISC::IStream &f) @@ -623,10 +623,10 @@ public: f.serial( DefensiveAfflictionPowerFactor ); // armor and jewel buff - f.serial( HpBuff ); - f.serial( SapBuff ); - f.serial( StaBuff ); - f.serial( FocusBuff ); + f.serial( ChaScore1Buff ); + f.serial( ChaScore2Buff ); + f.serial( ChaScore3Buff ); + f.serial( ChaScore4Buff ); if (f.isReading()) { diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp index 0cc44399d..bc2b26810 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp @@ -465,9 +465,9 @@ void CStaticPacts::readGeorges( const NLMISC::CSmartPtr &form, float duration; // 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; @@ -479,20 +479,20 @@ void CStaticPacts::readGeorges( const NLMISC::CSmartPtr &form, 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; @@ -598,39 +598,39 @@ void CStaticCreatures::readGeorges( const NLMISC::CSmartPtr &f uint32 playerSkillLevel = 1; if ( !root.getValueByName( playerSkillLevel, "Basics.PlayerSkillLevel" ) ) { - nlwarning("ERROR For creature sheet %s, cannot read Basics.PlayerSkillLevel, creature HP may be inacurate !", sheetId.toString().c_str() ); + nlwarning("ERROR For creature sheet %s, cannot read Basics.PlayerSkillLevel, creature ChaScore1 may be inacurate !", sheetId.toString().c_str() ); } _NbPlayers = 1; if ( !root.getValueByName( _NbPlayers, "Basics.NbPlayers" ) ) { - nlwarning("ERROR For creature sheet %s, cannot read Basics.NbPlayers, creature HP may be inacurate !", sheetId.toString().c_str() ); + nlwarning("ERROR For creature sheet %s, cannot read Basics.NbPlayers, creature ChaScore1 may be inacurate !", sheetId.toString().c_str() ); } - sint32 hp; - root.getValueByName( hp, "Basics.life" ); + sint32 ChaScore1; + root.getValueByName( ChaScore1, "Basics.ChaScore1" ); float regen; - root.getValueByName( regen, "Basics.LifeRegen" ); + root.getValueByName( regen, "Basics.ChaScore1Regen" ); - if (hp == 0) + if (ChaScore1 == 0) { - nlwarning("CStaticCreatures::readGeorges : spawning a creature with 0 Hit Points ! (SHEET %s), set the hp to 100", sheetId.toString().c_str()); - hp = 100; + nlwarning("CStaticCreatures::readGeorges : spawning a creature with 0 ChaScore1 ! (SHEET %s), set the ChaScore1 to 100", sheetId.toString().c_str()); + ChaScore1 = 100; } for( i = 0; i < SCORES::NUM_SCORES; ++i ) { - _Scores[ i ] = hp; + _Scores[ i ] = ChaScore1; _Regen[ i ] = regen; } /////////////////////////////////////////////////////// // Creature Damage Per Hit /////////////////////////////////////////////////////// - _PlayerHpLevel = 1; + _PlayerChaScore1Level = 1; _NbHitToKillPlayer = 10.0f; - if ( !root.getValueByName( _PlayerHpLevel, "Basics.PlayerHpLevel" ) ) + if ( !root.getValueByName( _PlayerChaScore1Level, "Basics.PlayerChaScore1Level" ) ) { - nlwarning("ERROR For creature sheet %s, cannot read Basics.PlayerHpLevel, creature damage may be inacurate !", sheetId.toString().c_str() ); + nlwarning("ERROR For creature sheet %s, cannot read Basics.PlayerChaScore1Level, creature damage may be inacurate !", sheetId.toString().c_str() ); } if ( !root.getValueByName( _NbHitToKillPlayer, "Basics.NbHitToKillPlayer" ) ) { @@ -643,7 +643,7 @@ void CStaticCreatures::readGeorges( const NLMISC::CSmartPtr &f _NbHitToKillPlayer = 3.0f; } - _CreatureDamagePerHitWithoutAverageDodge = uint32( (100*_PlayerHpLevel) / _NbHitToKillPlayer ); + _CreatureDamagePerHitWithoutAverageDodge = uint32( (100*_PlayerChaScore1Level) / _NbHitToKillPlayer ); compileCreatureDamagePerHit(); @@ -861,8 +861,8 @@ void CStaticCreatures::readGeorges( const NLMISC::CSmartPtr &f // damage shield _DamageShieldDamage = 0; root.getValueByName( _DamageShieldDamage, "Damage Shield.Damage"); - _DamageShieldHpDrain = 0; - root.getValueByName( _DamageShieldHpDrain, "Damage Shield.Drained HP"); + _DamageShieldChaScore1Drain = 0; + root.getValueByName( _DamageShieldChaScore1Drain, "Damage Shield.Drained ChaScore1"); // action on death if ( root.getValueByName(value, "ActionOnDeath") ) @@ -978,7 +978,7 @@ void CStaticCreatures::serial(class NLMISC::IStream &f) throw(NLMISC::EStream) f.serial( _BagInventorySheet ); f.serial(_DamageShieldDamage); - f.serial(_DamageShieldHpDrain); + f.serial(_DamageShieldChaScore1Drain); } /////////////////////////////////////////////////////////////////////////// @@ -1023,14 +1023,14 @@ CAttributeMapping::CAttributeMapping() _StaticAttributeMap.insert(make_pair(std::string("basics.level"), at_level)); _StaticAttributeMap.insert(make_pair(std::string("basics.playerskilllevel"), at_player_skill_level)); _StaticAttributeMap.insert(make_pair(std::string("basics.nbplayers"), at_nb_players)); - _StaticAttributeMap.insert(make_pair(std::string("basics.playerhplevel"), at_player_hp_level)); + _StaticAttributeMap.insert(make_pair(std::string("basics.playerChaScore1level"), at_player_ChaScore1_level)); _StaticAttributeMap.insert(make_pair(std::string("basics.nbhittokillplayer"), at_nb_hit_to_kill_player)); _StaticAttributeMap.insert(make_pair(std::string("basics.ecosystem"), at_ecosystem)); _StaticAttributeMap.insert(make_pair(std::string("basics.type"), at_type)); _StaticAttributeMap.insert(make_pair(std::string("basics.fame"), at_fame)); _StaticAttributeMap.insert(make_pair(std::string("basics.famebykill"), at_fame_by_kill)); - _StaticAttributeMap.insert(make_pair(std::string("basics.life"), at_life)); - _StaticAttributeMap.insert(make_pair(std::string("basics.liferegen"), at_liferegen)); + _StaticAttributeMap.insert(make_pair(std::string("basics.ChaScore1"), at_ChaScore1)); + _StaticAttributeMap.insert(make_pair(std::string("basics.ChaScore1regen"), at_ChaScore1regen)); _StaticAttributeMap.insert(make_pair(std::string("basics.attackspeed"), at_attack_speed )); _StaticAttributeMap.insert(make_pair(std::string("basics.attacklevel"), at_attack_level)); _StaticAttributeMap.insert(make_pair(std::string("basics.defenselevel"), at_defense_level )); @@ -1199,11 +1199,11 @@ bool CStaticCreatures::applyUserModel(CCustomElementId userModelId, const std::v break; } - case at_player_hp_level: + case at_player_ChaScore1_level: { - nldebug(" Applying '%s': setting playerHpLevel to '%s'", modelId.c_str(), scriptLine[1].c_str()); - NLMISC::fromString(scriptLine[1], _PlayerHpLevel); - _CreatureDamagePerHitWithoutAverageDodge = uint32( (100*_PlayerHpLevel) / _NbHitToKillPlayer ); + nldebug(" Applying '%s': setting playerChaScore1Level to '%s'", modelId.c_str(), scriptLine[1].c_str()); + NLMISC::fromString(scriptLine[1], _PlayerChaScore1Level); + _CreatureDamagePerHitWithoutAverageDodge = uint32( (100*_PlayerChaScore1Level) / _NbHitToKillPlayer ); compileCreatureDamagePerHit(); break; } @@ -1223,7 +1223,7 @@ bool CStaticCreatures::applyUserModel(CCustomElementId userModelId, const std::v errors = true; } - _CreatureDamagePerHitWithoutAverageDodge = uint32( (100*_PlayerHpLevel) / _NbHitToKillPlayer ); + _CreatureDamagePerHitWithoutAverageDodge = uint32( (100*_PlayerChaScore1Level) / _NbHitToKillPlayer ); compileCreatureDamagePerHit(); break; } @@ -1258,39 +1258,39 @@ bool CStaticCreatures::applyUserModel(CCustomElementId userModelId, const std::v break; } - case at_life: + case at_ChaScore1: { - sint32 hp; - NLMISC::fromString(scriptLine[1], hp); + sint32 ChaScore1; + NLMISC::fromString(scriptLine[1], ChaScore1); - if (hp == 0) + if (ChaScore1 == 0) { - nlwarning("Error while applying user model '%s' : spawning a creature with 0 Hit Points ! set the hp to 100", modelId.c_str()); - hp = 100; + nlwarning("Error while applying user model '%s' : spawning a creature with 0 ChaScore1 ! set the ChaScore1 to 100", modelId.c_str()); + ChaScore1 = 100; errors = true; } - nldebug(" Applying '%s': setting Hp to '%u'", modelId.c_str(), hp); + nldebug(" Applying '%s': setting ChaScore1 to '%u'", modelId.c_str(), ChaScore1); - _Scores[SCORES::hit_points] = hp; + _Scores[SCORES::cha_score1] = ChaScore1; break; } - case at_liferegen: + case at_ChaScore1regen: { char *ptr = NULL; - float lifeRegen = static_cast(strtod(scriptLine[1].c_str(), &ptr)); + float ChaScore1Regen = static_cast(strtod(scriptLine[1].c_str(), &ptr)); if (ptr != NULL && *ptr == '\0' && errno != ERANGE) { - _Regen[SCORES::hit_points] = lifeRegen; - nldebug(" Applying '%s' : setting lifeRegen to %f", modelId.c_str(), lifeRegen); + _Regen[SCORES::cha_score1] = ChaScore1Regen; + nldebug(" Applying '%s' : setting ChaScore1Regen to %f", modelId.c_str(), ChaScore1Regen); } else { - _Regen[SCORES::hit_points] = 1; - nlwarning("Error while applying user model '%s': cannot read Basics.LifeRegen, set it to 1.0!", modelId.c_str() ); + _Regen[SCORES::cha_score1] = 1; + nlwarning("Error while applying user model '%s': cannot read Basics.ChaScore1Regen, set it to 1.0!", modelId.c_str() ); errors = true; } break; diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h index 527f5ee09..6e42a3498 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h @@ -239,17 +239,17 @@ class CStaticPacts public: struct SPact { - uint16 LoseHitPointsLevel; - uint16 LoseStaminaLevel; - uint16 LoseSapLevel; + uint16 LoseChaScore1Level; + uint16 LoseChaScore2Level; + uint16 LoseChaScore3Level; uint16 LoseSkillsLevel; NLMISC::TGameCycle Duration; 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 ); } @@ -342,7 +342,7 @@ public: // damage shield virtual uint16 getDamageShieldDamage() const = 0; - virtual uint16 getDamageShieldHpDrain() const = 0; + virtual uint16 getDamageShieldChaScore1Drain() const = 0; //@} ///@name Methods @@ -413,7 +413,7 @@ public: virtual float getColWidth() const { return _Sheet->getColWidth(); } virtual uint16 getDamageShieldDamage() const { return _Sheet->getDamageShieldDamage(); } - virtual uint16 getDamageShieldHpDrain() const { return _Sheet->getDamageShieldHpDrain(); } + virtual uint16 getDamageShieldChaScore1Drain() const { return _Sheet->getDamageShieldChaScore1Drain(); } virtual std::vector const& getMps() const { return _Sheet->getMps(); } @@ -439,15 +439,15 @@ enum TAttributeType at_level, at_player_skill_level, at_nb_players, - at_player_hp_level, + at_player_ChaScore1_level, at_nb_hit_to_kill_player, at_ecosystem, at_type, at_fame, at_fame_by_kill, at_fame_for_guard_attack, - at_life, - at_liferegen, + at_ChaScore1, + at_ChaScore1regen, at_attack_speed, at_attack_level, at_defense_level, @@ -566,7 +566,7 @@ public: virtual float getColWidth() const { return _ColWidth; } virtual uint16 getDamageShieldDamage() const { return _DamageShieldDamage; } - virtual uint16 getDamageShieldHpDrain() const { return _DamageShieldHpDrain; } + virtual uint16 getDamageShieldChaScore1Drain() const { return _DamageShieldChaScore1Drain; } virtual std::vector const& getMps() const { return CStaticHarvestable::getMps(); } @@ -578,7 +578,7 @@ private: uint8 _Gender; uint8 _Size; uint16 _Level; - uint32 _PlayerHpLevel; + uint32 _PlayerChaScore1Level; float _NbHitToKillPlayer; uint16 _AttackLevel; uint16 _DefenseLevel; @@ -632,7 +632,7 @@ private: // damage shield uint16 _DamageShieldDamage; - uint16 _DamageShieldHpDrain; + uint16 _DamageShieldChaScore1Drain; public: /// read the sheet diff --git a/code/ryzom/server/src/entities_game_service/egs_variables.cpp b/code/ryzom/server/src/entities_game_service/egs_variables.cpp index a96452aca..25b26345c 100644 --- a/code/ryzom/server/src/entities_game_service/egs_variables.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_variables.cpp @@ -135,7 +135,7 @@ CVariable ForageKamiAngerThreshold2( CVariable ForageKamiAngerPunishDamage( "egs", - "ForageKamiPunishDamage", "Max HP hit once by an angry (invisible) kami", + "ForageKamiPunishDamage", "Max ChaScore1 hit once by an angry (invisible) kami", 6000, 0, true ); @@ -304,7 +304,7 @@ CVariable MaxCharacteristicValue("egs","MaxCharacteristicValue", "Max // factor on creature and npc damage CVariable BotDamageFactor("egs","BotDamageFactor", "Factor applied on all Bots (creature and npcs) damage", 1.0f, 0, true ); -CVariable HitChestStaLossFactor("egs","HitChestStaLossFactor", "factor of damage also lost in sta when hit to chest", 0.5f, 0, true ); +CVariable HitChestChaScore2LossFactor("egs","HitChestChaScore2LossFactor", "factor of damage also lost in ChaScore2 when hit to chest", 0.5f, 0, true ); CVariable HitHeadStunDuration("egs","HitHeadStunDuration", "duration (in seconds) of a stun when hit to head", 2.5f, 0, true ); CVariable HitArmsSlowDuration("egs","HitArmsSlowDuration", "duration (in seconds) of a slow attack when hit to arms", 5.0f, 0, true ); CVariable HitArmsSlowFactor("egs","HitArmsSlowFactor", "slowing factor when hit to arms (+20 = +20% to attack latency)", 50, 0, true ); @@ -375,7 +375,7 @@ CVariable ForageExtractionCareEcoSpecFactor( "egs", "ForageExtractionCare CVariable ForageExtractionNaturalDDeltaPerTick( "egs", "ForageExtractionNaturalDDeltaPerTick", "D increase per tick", 0.1f, 0, true ); CVariable ForageExtractionNaturalEDeltaPerTick( "egs", "ForageExtractionNaturalEDeltaPerTick", "E increase per tick", 0.1f, 0, true ); -CVariable ForageHPRatioPerSourceLifeImpact( "egs", "HPRatioPerSourceLifeImpact", "Ratio of HP damaged per source life (D) impact value", 0.003937f, 0, true ); // 1/127 / 2 +CVariable ForageChaScore1RatioPerSourceLifeImpact( "egs", "ChaScore1RatioPerSourceLifeImpact", "Ratio of ChaScore1 damaged per source life (D) impact value", 0.003937f, 0, true ); // 1/127 / 2 CVariable ForageCareFactor( "egs","ForageCareFactor","Factor for care delta", 4.0f,0, true ); CVariable ForageCareBeginZone( "egs", "ForageCareBeginZone", "", 5.0f, 0, true ); @@ -384,8 +384,8 @@ CVariable ForageExtractionXPFactor( "egs", "ForageExtractionXPFactor", "" CVariable ForageExtractionNbParticipantsXPBonusRatio( "egs", "ForageExtractionNbParticipantsXPBonusRatio", "", 0.1f, 0, true ); CVariable ForageExtractionNastyEventXPMalusRatio( "egs", "ForageExtractionNastyEventXPMalusRatio", "", 0.1f, 0, true ); -CVariable ToxicCloudDamage( "egs","ToxicCloudDamage", "Max HP hit by a toxic cloud at ToxicCloudUpdateFrequency", 800.0f, true ); -CVariable ForageExplosionDamage( "egs","ForageExplosionDamage", "Max HP hit once by a forage explosion", 4000.0f, true ); +CVariable ToxicCloudDamage( "egs","ToxicCloudDamage", "Max ChaScore1 hit by a toxic cloud at ToxicCloudUpdateFrequency", 800.0f, true ); +CVariable ForageExplosionDamage( "egs","ForageExplosionDamage", "Max ChaScore1 hit once by a forage explosion", 4000.0f, true ); CVariable FameByKill( "egs","FameByKill", "Number of fame point lost for a kill", -5000, true ); @@ -441,7 +441,7 @@ CVariable ForageKamiOfferingSpeed( "egs","ForageKamiOfferingSpeed", CVariable ForageReduceDamageTimeWindow( "egs", "ForageReduceDamageTimeWindow", "Time in tick before a blowing up when Reduce Damage actions are taken into account", 30, 0, true ); // 3 s CVariable ForageDebug( "egs","ForageDebug", - "Debug mode for forage phrases (0=normal 2=focusOnly 5=focus+skill 7=prospectionWithVariables 10=fullCheat)", 0, + "Debug mode for forage phrases (0=normal 2=ChaScore4Only 5=ChaScore4+skill 7=prospectionWithVariables 10=fullCheat)", 0, 0, true ); CVariable ForageSourceSpawnDelay( "egs","ForageSourceSpawnDelay", "Time (ticks) between end of prospection & spawning the source(s)", @@ -453,7 +453,7 @@ CVariable ForageValidateSourcesSpawnPos( "egs", "ForageValidateSourcesSpaw CVariable ForageRange( "egs","ForageRange", "", 0, 0, false ); CVariable ForageAngle( "egs","ForageAngle", "", 0, 0, false ); CVariable ForageLevel( "egs","ForageLevel", "", 0, 0, false ); -CVariable ForageFocusRatioOfLocateDeposit( "egs", "ForageFocusRatioOfLocateDeposit", "", 10, 0, true ); +CVariable ForageChaScore4RatioOfLocateDeposit( "egs", "ForageChaScore4RatioOfLocateDeposit", "", 10, 0, true ); CVariable ForageQuantityXPDeltaLevelBonusRate( "egs", "ForageQuantityXPDeltaLevelBonusRate", "Delta level increase per qtty unit (except 1st one)", 2.0f, 0, true ); CVariable QuarteringQuantityAverageForCraftHerbivore( "egs", "QuarteringQuantityAverageForCraftHerbivore", "Control the global quantity in quartering for craft RMs of herbivores (H/B/P)", 1.0f, 0, true ); @@ -488,7 +488,7 @@ NLMISC::CVariable MessageOfTheDay("egs","MessageOfTheDay", "Message NLMISC::CVariable MaxDistanceGooDamage("egs","MaxDistanceGooDamage", "the maximum distance when character take damage from goo path", 100.0f, 0, true ); NLMISC::CVariable DeathGooDistance("egs","DeathGooDistance", "the distance when character take 100% damage from goo path", 1.0f, 0, true ); -NLMISC::CVariable MaxGooDamageRatio("egs","MaxGooDamageRatio", "the factor applied goo damage for calculate effective goo damage (distance = 0 - 100% * ratio * base hp = damages)", 0.5f, 0, true ); +NLMISC::CVariable MaxGooDamageRatio("egs","MaxGooDamageRatio", "the factor applied goo damage for calculate effective goo damage (distance = 0 - 100% * ratio * base ChaScore1 = damages)", 0.5f, 0, true ); NLMISC::CVariable NBTickForGooDamageRate("egs","NBTickForGooDamageRate", "nb tick needed for apply goo damage again", 5, 0, true ); NLMISC::CVariable NBTickForNewbieGooDamageRate("egs","NBTickForNewbieGooDamageRate", "nb tick needed for apply goo damage again in newbieland", 10, 0, true ); NLMISC::CVariable NewbieGooDamageFactor("egs","NewbieGooDamageFactor", "percentage of life lost at maximum from goo in newbieland", .2f, 0, true ); diff --git a/code/ryzom/server/src/entities_game_service/egs_variables.h b/code/ryzom/server/src/entities_game_service/egs_variables.h index 661564987..21ba34858 100644 --- a/code/ryzom/server/src/entities_game_service/egs_variables.h +++ b/code/ryzom/server/src/entities_game_service/egs_variables.h @@ -187,7 +187,7 @@ extern NLMISC::CVariable RegenReposFactor; extern NLMISC::CVariable RegenOffset; extern NLMISC::CVariable MaxCharacteristicValue; extern NLMISC::CVariable BotDamageFactor; -extern NLMISC::CVariable HitChestStaLossFactor; +extern NLMISC::CVariable HitChestChaScore2LossFactor; extern NLMISC::CVariable HitHeadStunDuration; extern NLMISC::CVariable HitArmsSlowDuration; extern NLMISC::CVariable HitArmsSlowFactor; @@ -259,7 +259,7 @@ extern NLMISC::CVariable ForageExtractionAbsorptionEcoSpecMax; extern NLMISC::CVariable ForageExtractionCareEcoSpecFactor; extern NLMISC::CVariable ForageExtractionNaturalDDeltaPerTick; extern NLMISC::CVariable ForageExtractionNaturalEDeltaPerTick; -extern NLMISC::CVariable ForageHPRatioPerSourceLifeImpact; +extern NLMISC::CVariable ForageChaScore1RatioPerSourceLifeImpact; extern NLMISC::CVariable ForageCareFactor; extern NLMISC::CVariable ForageCareSpeed; extern NLMISC::CVariable ForageCareBeginZone; @@ -275,7 +275,7 @@ extern NLMISC::CVariable ForageValidateSourcesSpawnPos; extern NLMISC::CVariable ForageRange; extern NLMISC::CVariable ForageAngle; extern NLMISC::CVariable ForageLevel; -extern NLMISC::CVariable ForageFocusRatioOfLocateDeposit; +extern NLMISC::CVariable ForageChaScore4RatioOfLocateDeposit; extern NLMISC::CVariable ForageQuantityXPDeltaLevelBonusRate; extern NLMISC::CVariable ForageExtractionTimeMinGC; extern NLMISC::CVariable ForageExtractionTimeSlopeGC; diff --git a/code/ryzom/server/src/entities_game_service/entities_game_service.cpp b/code/ryzom/server/src/entities_game_service/entities_game_service.cpp index 752e3db6e..062c30dcc 100644 --- a/code/ryzom/server/src/entities_game_service/entities_game_service.cpp +++ b/code/ryzom/server/src/entities_game_service/entities_game_service.cpp @@ -224,7 +224,7 @@ float MaxHarvestDistance = 5.5f; // max mount distance float MaxMountDistance = 2.f; -// the max value if Team members hp/sta/sap status window (represents 100% of max value) +// the max value of Team members ChaScore1/ChaScore2/ChaScore3 status window (represents 100% of max value) uint8 TeamMembersStatusMaxValue = 127; // Globals variables for the brick manager @@ -237,7 +237,7 @@ float MaxEngageMeleeDistance = 20.0f; float MaxEngageRangeDistance = 100.0f; // Item decay related values -float CarriedItemsDecayRatio = 0.01f; // 1% of maxHp lot every 'rate' s +float CarriedItemsDecayRatio = 0.01f; // 1% of maxHP lot every 'rate' s float CarriedItemsDecayRate = 360.0; // rate of decay in seconds (default = 6 minutes (so 10%/hour)) bool UnlimitedDeathPact = false; @@ -380,7 +380,7 @@ void processMirrorUpdates() { const bool previous = user->isInWater(); user->updateIsInWater(); - // if player is going in water, remove all stored Xp from it's attackers and set thier Hp to max value + // if player is going in water, remove all stored Xp from it's attackers and set their ChaScore1 to max value if ( ! previous && user->isInWater()) { user->entersWater(); @@ -1384,8 +1384,8 @@ void CPlayerService::init() TRANSPORT_CLASS_REGISTER (CReportAIInstanceDespawnMsgImp); TRANSPORT_CLASS_REGISTER (CWarnBadInstanceMsg); TRANSPORT_CLASS_REGISTER (CCreatureCompleteHealImp); - TRANSPORT_CLASS_REGISTER (CChangeCreatureMaxHPImp); - TRANSPORT_CLASS_REGISTER (CChangeCreatureHPImp); + TRANSPORT_CLASS_REGISTER (CChangeCreatureMaxChaScore1Imp); + TRANSPORT_CLASS_REGISTER (CChangeCreatureChaScore1Imp); TRANSPORT_CLASS_REGISTER (CCreatureSetUrlImp); TRANSPORT_CLASS_REGISTER (CChangeCreatureModeMsg); TRANSPORT_CLASS_REGISTER (CGiveItemRequestMsgImp); @@ -4732,7 +4732,7 @@ NLMISC_COMMAND(teleportPlayerCharacter,"Teleport online player character"," ") +NLMISC_COMMAND(setChaScore1Bar,"set the value of an entity ChaScore1 bar (0..100)"," ") { if( args.size() == 2 ) { @@ -4767,8 +4767,8 @@ NLMISC_COMMAND(setHPBar,"set the value of an entity HP bar (0..100)","setScoreBar( SCORES::hit_points, (uint32)(barValue * 1023 / 100) ); - log.displayNL("for entity id %s, new hpBar value : %d", id.toString().c_str(), barValue ); + entity->setScoreBar( SCORES::cha_score1, (uint32)(barValue * 1023 / 100) ); + log.displayNL("for entity id %s, new ChaScore1Bar value : %d", id.toString().c_str(), barValue ); return true; } diff --git a/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.cpp b/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.cpp index 6b2fe76bd..4a717e096 100644 --- a/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.cpp +++ b/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.cpp @@ -188,7 +188,7 @@ CEntityBase::CEntityBase(bool noSkills) _PreventEntityMoves = 0; _DamageShieldDamage = 0; - _DamageShieldHpDrain = 0; + _DamageShieldChaScore1Drain = 0; _MezzCount = 0; // god mod inactive @@ -209,7 +209,7 @@ void CEntityBase::clear() _ProtectedSlot= SLOT_EQUIPMENT::UNDEFINED; _PreventEntityMoves= 0; _DamageShieldDamage= 0; - _DamageShieldHpDrain= 0; + _DamageShieldChaScore1Drain= 0; _MezzCount= 0; _Stunned= false; _IsDead= false; @@ -283,8 +283,8 @@ void CEntityBase::addPropertiesToMirror( const TDataSetRow& entityIndex, bool ke } /// physical characteristics - _PhysScores._PhysicalScores[ SCORES::hit_points ].Max.tempMirrorize( TheDataset, entityIndex, DSPropertyMAX_HIT_POINTS ); - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current.tempMirrorize( TheDataset, entityIndex, DSPropertyCURRENT_HIT_POINTS ); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Max.tempMirrorize( TheDataset, entityIndex, DSPropertyMAX_ChaScore1 ); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current.tempMirrorize( TheDataset, entityIndex, DSPropertyCURRENT_ChaScore1 ); /// current run speed _PhysScores.CurrentRunSpeed.tempMirrorize( TheDataset, entityIndex, DSPropertyCURRENT_RUN_SPEED ); @@ -745,12 +745,12 @@ const sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) //--------------------------------------------------- -// changeCurrentHp : +// changeCurrentChaScore1 : // //--------------------------------------------------- // the fact that this returns "true" to indicate that the entity dies is really, really dumb. -bool CEntityBase::changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEntity) +bool CEntityBase::changeCurrentChaScore1(sint32 deltaValue, TDataSetRow responsibleEntity) { // test entity isn't dead already (unless it's a player) if (isDead()) @@ -777,7 +777,7 @@ bool CEntityBase::changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEnti } } - _PhysScores._PhysicalScores[SCORES::hit_points].Current = _PhysScores._PhysicalScores[SCORES::hit_points].Current + deltaValue; + _PhysScores._PhysicalScores[SCORES::cha_score1].Current = _PhysScores._PhysicalScores[SCORES::cha_score1].Current + deltaValue; // if entity is mezzed and delta is != 0 unmezz it if (_MezzCount && deltaValue != 0) @@ -785,7 +785,7 @@ bool CEntityBase::changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEnti unmezz(); } - if (_PhysScores._PhysicalScores[SCORES::hit_points].Current <= 0) + if (_PhysScores._PhysicalScores[SCORES::cha_score1].Current <= 0) { // for god mode if (!_GodMode && !_Invulnerable) @@ -800,17 +800,17 @@ bool CEntityBase::changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEnti } else { - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = _PhysScores._PhysicalScores[ SCORES::hit_points ].Base; - setHpBar( 1023 ); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base; + setChaScore1Bar( 1023 ); return false; } } else { - if( _PhysScores._PhysicalScores[SCORES::hit_points].Max > 0) - setHpBar( (uint32) ( (1023 * _PhysScores._PhysicalScores[SCORES::hit_points].Current) / _PhysScores._PhysicalScores[SCORES::hit_points].Max) ); + if( _PhysScores._PhysicalScores[SCORES::cha_score1].Max > 0) + setChaScore1Bar( (uint32) ( (1023 * _PhysScores._PhysicalScores[SCORES::cha_score1].Current) / _PhysScores._PhysicalScores[SCORES::cha_score1].Max) ); else - setHpBar(0); + setChaScore1Bar(0); return false; } @@ -1262,9 +1262,9 @@ void CEntityBase::applyRegenAndClipCurrentValue() // if ( _PhysScores._PhysicalScores[ i ].CurrentRegenerate < 0 ) _PhysScores._PhysicalScores[ i ].CurrentRegenerate = 0; // } // - _PhysScores._PhysicalScores[ SCORES::hit_points ].CurrentRegenerate = _PhysScores._PhysicalScores[ SCORES::hit_points ].RegenerateModifier + _PhysScores._PhysicalScores[ SCORES::hit_points ].BaseRegenerateRepos; - if ( _PhysScores._PhysicalScores[ SCORES::hit_points ].CurrentRegenerate < 0 ) - _PhysScores._PhysicalScores[ SCORES::hit_points ].CurrentRegenerate = 0; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].CurrentRegenerate = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].RegenerateModifier + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].BaseRegenerateRepos; + if ( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].CurrentRegenerate < 0 ) + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].CurrentRegenerate = 0; @@ -1310,7 +1310,7 @@ void CEntityBase::applyRegenAndClipCurrentValue() // _PhysScores._PhysicalScores[ i ].RegenerateTickUpdate = CTickEventHandler::getGameCycle(); // } // - i= SCORES::hit_points; + i= SCORES::cha_score1; if( _PhysScores._PhysicalScores[ i ].Current < _PhysScores._PhysicalScores[ i ].Max ) { _PhysScores._PhysicalScores[ i ].KeepRegenerateDecimal += _PhysScores._PhysicalScores[ i ].CurrentRegenerate * ( CTickEventHandler::getGameCycle() - _PhysScores._PhysicalScores[ i ].RegenerateTickUpdate ) * 0.10f; @@ -1320,7 +1320,7 @@ void CEntityBase::applyRegenAndClipCurrentValue() { _PhysScores._PhysicalScores[ i ].Current = (sint32) ( _PhysScores._PhysicalScores[ i ].Current + sintPart ); _PhysScores._PhysicalScores[ i ].KeepRegenerateDecimal -= sintPart; - PROGRESSIONPVE::CCharacterProgressionPVE::getInstance()->applyRegenHP(_EntityRowId, sintPart); + PROGRESSIONPVE::CCharacterProgressionPVE::getInstance()->applyRegenChaScore1(_EntityRowId, sintPart); } } if( _PhysScores._PhysicalScores[ i ].Current > _PhysScores._PhysicalScores[ i ].Max ) diff --git a/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.h b/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.h index 40503f16c..e1a0aeed1 100644 --- a/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.h +++ b/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.h @@ -552,11 +552,11 @@ public: sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw (CEntityBase::EInvalidStat); const sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm ) const throw (CEntityBase::EInvalidStat); - /// accessors on hp (read only) - inline sint32 currentHp() const { return _PhysScores._PhysicalScores[SCORES::hit_points].Current;} + /// accessors on ChaScore1 (read only) + inline sint32 currentChaScore1() const { return _PhysScores._PhysicalScores[SCORES::cha_score1].Current;} - /// accessors on max hp (read only) - inline sint32 maxHp() const { return _PhysScores._PhysicalScores[SCORES::hit_points].Max;} + /// accessors on max ChaScore1 (read only) + inline sint32 maxChaScore1() const { return _PhysScores._PhysicalScores[SCORES::cha_score1].Max;} /// accessor on score inline sint32 getCurrentScore(SCORES::TScores score) const @@ -575,24 +575,24 @@ public: } /** - * change hp with a delta value - * \param deltaValue the delta value applied on hp + * change ChaScore1 with a delta value + * \param deltaValue the delta value applied on ChaScore1 * \return bool true if the entity died from the changement */ - virtual bool changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEntity = TDataSetRow()); + virtual bool changeCurrentChaScore1(sint32 deltaValue, TDataSetRow responsibleEntity = TDataSetRow()); /** - * change given score with a delta value (NOT to use for hitpoints, use changeCurrentHP instead - * \param deltaValue the delta value applied on stamina + * change given score with a delta value (NOT to use for ChaScore1, use changeCurrentChaScore1 instead + * \param deltaValue the delta value applied on ChaScore2 */ inline void changeScore(SCORES::TScores score, sint32 delta) { if (score >= SCORES::unknown || score < 0) return; - if (score == SCORES::hit_points) + if (score == SCORES::cha_score1) { - changeCurrentHp(delta, TDataSetRow()); + changeCurrentChaScore1(delta, TDataSetRow()); return; } @@ -618,7 +618,7 @@ public: if( _PhysScores._PhysicalScores[score].Max > 0) { uint32 bar; - if( score == SCORES::hit_points ) + if( score == SCORES::cha_score1 ) { bar = (uint32)( (1023 * _PhysScores._PhysicalScores[score].Current) / _PhysScores._PhysicalScores[score].Max); } @@ -639,24 +639,24 @@ public: { register TYPE_BARS barresValue = 0; register sint32 barLevel; - SCharacteristicsAndScores &hp = _PhysScores._PhysicalScores[SCORES::hit_points]; - sint32 maxhp = hp.Max; - if ( maxhp != 0 ) - barLevel = (sint32)( (1023 * hp.Current) / maxhp); + SCharacteristicsAndScores &ChaScore1 = _PhysScores._PhysicalScores[SCORES::cha_score1]; + sint32 maxChaScore1 = ChaScore1.Max; + if ( maxChaScore1 != 0 ) + barLevel = (sint32)( (1023 * ChaScore1.Current) / maxChaScore1); else barLevel = 0; barresValue = (uint32)barLevel & 0x7ff; - // bots only use the hp bar + // bots only use the ChaScore1 bar if (_Id.getType() != RYZOMID::player) { _StatusBars = barresValue; return; } - if( _PhysScores._PhysicalScores[SCORES::stamina].Max > 0 ) + if( _PhysScores._PhysicalScores[SCORES::cha_score2].Max > 0 ) { - barLevel = (uint32)( (127 * _PhysScores._PhysicalScores[SCORES::stamina].Current) / _PhysScores._PhysicalScores[SCORES::stamina].Max); + barLevel = (uint32)( (127 * _PhysScores._PhysicalScores[SCORES::cha_score2].Current) / _PhysScores._PhysicalScores[SCORES::cha_score2].Max); } else { @@ -664,9 +664,9 @@ public: } barresValue = barresValue | (barLevel<<11); - if( _PhysScores._PhysicalScores[SCORES::sap].Max > 0 ) + if( _PhysScores._PhysicalScores[SCORES::cha_score3].Max > 0 ) { - barLevel = (uint32)( (127 * _PhysScores._PhysicalScores[SCORES::sap].Current) / _PhysScores._PhysicalScores[SCORES::sap].Max); + barLevel = (uint32)( (127 * _PhysScores._PhysicalScores[SCORES::cha_score3].Current) / _PhysScores._PhysicalScores[SCORES::cha_score3].Max); } else { @@ -674,9 +674,9 @@ public: } barresValue = barresValue | (barLevel<<18); - if( _PhysScores._PhysicalScores[SCORES::focus].Max > 0 ) + if( _PhysScores._PhysicalScores[SCORES::cha_score4].Max > 0 ) { - barLevel = (uint32)( (127 * _PhysScores._PhysicalScores[SCORES::focus].Current) / _PhysScores._PhysicalScores[SCORES::focus].Max); + barLevel = (uint32)( (127 * _PhysScores._PhysicalScores[SCORES::cha_score4].Current) / _PhysScores._PhysicalScores[SCORES::cha_score4].Max); } else { @@ -696,17 +696,17 @@ public: { switch(score) { - case SCORES::hit_points: - setHpBar(value); + case SCORES::cha_score1: + setChaScore1Bar(value); break; - case SCORES::stamina: - setStaminaBar(value); + case SCORES::cha_score2: + setChaScore2Bar(value); break; - case SCORES::sap: - setSapBar(value); + case SCORES::cha_score3: + setChaScore3Bar(value); break; - case SCORES::focus: - setFocusBar(value); + case SCORES::cha_score4: + setChaScore4Bar(value); break; default: nlwarning(" Score %s not managed",SCORES::toString(score).c_str()); @@ -714,36 +714,36 @@ public: }; } - /// set hp bar - inline void setHpBar( uint32 hpBar ) + /// set ChaScore1 bar + inline void setChaScore1Bar( uint32 ChaScore1Bar ) { - hpBar &= 0x7ff; - _StatusBars = _StatusBars & (0xfffff800); //erase last 11 digits (0..10) - _StatusBars = _StatusBars | uint32(hpBar); + ChaScore1Bar &= 0x7ff; + _StatusBars = _StatusBars & (0xfffff800); //erase ChaScore1 digits (0..10) + _StatusBars = _StatusBars | uint32(ChaScore1Bar); } - /// set stamina bar - inline void setStaminaBar( uint32 staminaBar ) + /// set ChaScore2 bar + inline void setChaScore2Bar( uint32 ChaScore2Bar ) { - staminaBar &= 0x7f; - _StatusBars = _StatusBars & (0xfffc07ff); //erase stamina digits (11..16) - _StatusBars = _StatusBars | (staminaBar << 11); + ChaScore2Bar &= 0x7f; + _StatusBars = _StatusBars & (0xfffc07ff); //erase ChaScore2 digits (11..16) + _StatusBars = _StatusBars | (ChaScore2Bar << 11); } - /// set sap bar - inline void setSapBar( uint32 sapBar ) + /// set ChaScore3 bar + inline void setChaScore3Bar( uint32 ChaScore3Bar ) { - sapBar &= 0x7f; - _StatusBars = _StatusBars & (0xfe03ffff); //erase sap digits (17..23) - _StatusBars = _StatusBars | (sapBar << 18); + ChaScore3Bar &= 0x7f; + _StatusBars = _StatusBars & (0xfe03ffff); //erase ChaScore3 digits (17..23) + _StatusBars = _StatusBars | (ChaScore3Bar << 18); } - /// set focus bar - inline void setFocusBar( uint32 focusBar ) + /// set ChaScore4 bar + inline void setChaScore4Bar( uint32 ChaScore4Bar ) { - focusBar &= 0x7f; - _StatusBars = _StatusBars & (0x01ffffff); //erase focus digits (24..31) - _StatusBars = _StatusBars | (focusBar << 25); + ChaScore4Bar &= 0x7f; + _StatusBars = _StatusBars & (0x01ffffff); //erase ChaScore4 digits (24..31) + _StatusBars = _StatusBars | (ChaScore4Bar << 25); } /// get the number of bag @@ -869,12 +869,12 @@ public: /// accessor on damage shield damage inline uint16 getDamageShieldDamage() const { return _DamageShieldDamage; } - /// accessor on damage shield Hp Drain - inline uint16 getDamageShieldHpDrain() const { return _DamageShieldHpDrain; } + /// accessor on damage shield ChaScore1 Drain + inline uint16 getDamageShieldChaScore1Drain() const { return _DamageShieldChaScore1Drain; } // damage shield modifiers - inline void incDamageShield( uint16 value ) { _DamageShieldDamage += value; _DamageShieldHpDrain += value; } - inline void decDamageShield( uint16 value ) { _DamageShieldDamage -= value; _DamageShieldHpDrain -= value; } + inline void incDamageShield( uint16 value ) { _DamageShieldDamage += value; _DamageShieldChaScore1Drain += value; } + inline void decDamageShield( uint16 value ) { _DamageShieldDamage -= value; _DamageShieldChaScore1Drain -= value; } /// remove all spells (effect on the entity and casted links) void removeAllSpells(); @@ -937,7 +937,7 @@ public: protected: /** - * kill entity (when it's hit points reach 0) + * kill entity (when it's ChaScore1 reach 0) * \param killerRowId if valid, the TDataSetRow of the entity which has killed the current entity */ virtual void kill(TDataSetRow killerRowId = TDataSetRow()) = 0; @@ -1032,8 +1032,8 @@ protected: /// damage shield : damage inflicted to melee attackers uint16 _DamageShieldDamage; - /// damage shield : HP drained from attacker (entity gains HP, attacker do NOT lose HP) - uint16 _DamageShieldHpDrain; + /// damage shield : ChaScore1 drained from attacker (entity gains ChaScore1, attacker do NOT lose ChaScore1) + uint16 _DamageShieldChaScore1Drain; CEntityListLink _ListLink; diff --git a/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp b/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp index d6ddde501..f79662823 100644 --- a/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp +++ b/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp @@ -1444,14 +1444,14 @@ void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNE // ch->_PropertyDatabase.setProp( "TARGET:BARS:UID", CLFECOMMON::INVALID_CLIENT_DATASET_INDEX ); CBankAccessor_PLR::getTARGET().getBARS().setUID(ch->_PropertyDatabase, CLFECOMMON::INVALID_CLIENT_DATASET_INDEX ); -// ch->_PropertyDatabase.setProp( "TARGET:BARS:HP", 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(ch->_PropertyDatabase, 0 ); -// ch->_PropertyDatabase.setProp( "TARGET:BARS:SAP", 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setSAP(ch->_PropertyDatabase, 0 ); -// ch->_PropertyDatabase.setProp( "TARGET:BARS:STA", 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setSTA(ch->_PropertyDatabase, 0 ); -// ch->_PropertyDatabase.setProp( "TARGET:BARS:FOCUS", 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setFOCUS(ch->_PropertyDatabase, 0 ); +// ch->_PropertyDatabase.setProp( "TARGET:BARS:ChaScore1", 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(ch->_PropertyDatabase, 0 ); +// ch->_PropertyDatabase.setProp( "TARGET:BARS:ChaScore2", 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore2(ch->_PropertyDatabase, 0 ); +// ch->_PropertyDatabase.setProp( "TARGET:BARS:ChaScore3", 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore3(ch->_PropertyDatabase, 0 ); +// ch->_PropertyDatabase.setProp( "TARGET:BARS:ChaScore4", 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore4(ch->_PropertyDatabase, 0 ); ch->setTarget( CEntityId::Unknown ); // player still intangible for a few seconds diff --git a/code/ryzom/server/src/entities_game_service/entity_manager/entity_manager.cpp b/code/ryzom/server/src/entities_game_service/entity_manager/entity_manager.cpp index adefe8d9e..1f4134c86 100644 --- a/code/ryzom/server/src/entities_game_service/entity_manager/entity_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/entity_manager/entity_manager.cpp @@ -83,7 +83,7 @@ void CAIInfosOnEntityMsgImp::callback (const std::string &name, NLNET::TServiceI } // egs specific infos - string strTemp = NLMISC::toString("HitPoints : %d / %d", entity->currentHp(), entity->maxHp()); + string strTemp = NLMISC::toString("ChaScore1 : %d / %d", entity->currentChaScore1(), entity->maxChaScore1()); egs_eminfo("%s",strTemp.c_str()); if (player) chatToPlayer(player->getId(), strTemp); @@ -181,20 +181,20 @@ void CQueryEgsImp::callback (const std::string &name, NLNET::TServiceId id) case CQueryEgs::Name: ret = character->getName().toUtf8(); break; - case CQueryEgs::Hp: ret = NLMISC::toString("%d", character->getCurrentScore(SCORES::hit_points)); break; - case CQueryEgs::Sap: ret = NLMISC::toString("%d", character->getCurrentScore(SCORES::sap)); break; - case CQueryEgs::Stamina: ret = NLMISC::toString("%d", character->getCurrentScore(SCORES::stamina)); break; - case CQueryEgs::Focus: ret = NLMISC::toString("%d", character->getCurrentScore(SCORES::focus)); break; + case CQueryEgs::ChaScore1: ret = NLMISC::toString("%d", character->getCurrentScore(SCORES::cha_score1)); break; + case CQueryEgs::ChaScore2: ret = NLMISC::toString("%d", character->getCurrentScore(SCORES::cha_score2)); break; + case CQueryEgs::ChaScore3: ret = NLMISC::toString("%d", character->getCurrentScore(SCORES::cha_score3)); break; + case CQueryEgs::ChaScore4: ret = NLMISC::toString("%d", character->getCurrentScore(SCORES::cha_score4)); break; // Max Score - case CQueryEgs::MaxHp: ret = NLMISC::toString("%d", character->getMaxScore(SCORES::hit_points)); break; - case CQueryEgs::MaxSap: ret = NLMISC::toString("%d", character->getMaxScore(SCORES::sap)); break; - case CQueryEgs::MaxStamina: ret = NLMISC::toString("%d", character->getMaxScore(SCORES::stamina)); break; - case CQueryEgs::MaxFocus: ret = NLMISC::toString("%d", character->getMaxScore(SCORES::focus)); break; + case CQueryEgs::MaxChaScore1: ret = NLMISC::toString("%d", character->getMaxScore(SCORES::cha_score1)); break; + case CQueryEgs::MaxChaScore2: ret = NLMISC::toString("%d", character->getMaxScore(SCORES::cha_score2)); break; + case CQueryEgs::MaxChaScore3: ret = NLMISC::toString("%d", character->getMaxScore(SCORES::cha_score3)); break; + case CQueryEgs::MaxChaScore4: ret = NLMISC::toString("%d", character->getMaxScore(SCORES::cha_score4)); break; // Score / MaxScore - case CQueryEgs::RatioHp: { sint32 val = character->getMaxScore(SCORES::hit_points); ret = NLMISC::toString("%d", val? 100 * character->getCurrentScore(SCORES::hit_points) / val:0);} break; - case CQueryEgs::RatioSap: { sint32 val = character->getMaxScore(SCORES::sap); ret = NLMISC::toString("%d", val? 100 * character->getCurrentScore(SCORES::sap) / val:0);} break; - case CQueryEgs::RatioStamina: { sint32 val = character->getMaxScore(SCORES::stamina); ret = NLMISC::toString("%d", val? 100 * character->getCurrentScore(SCORES::stamina) / val:0);} break; - case CQueryEgs::RatioFocus: { sint32 val = character->getMaxScore(SCORES::focus); ret = NLMISC::toString("%d", val? 100 * character->getCurrentScore(SCORES::focus) / val:0);} break; + case CQueryEgs::RatioChaScore1: { sint32 val = character->getMaxScore(SCORES::cha_score1); ret = NLMISC::toString("%d", val? 100 * character->getCurrentScore(SCORES::cha_score1) / val:0);} break; + case CQueryEgs::RatioChaScore2: { sint32 val = character->getMaxScore(SCORES::cha_score2); ret = NLMISC::toString("%d", val? 100 * character->getCurrentScore(SCORES::cha_score2) / val:0);} break; + case CQueryEgs::RatioChaScore3: { sint32 val = character->getMaxScore(SCORES::cha_score3); ret = NLMISC::toString("%d", val? 100 * character->getCurrentScore(SCORES::cha_score3) / val:0);} break; + case CQueryEgs::RatioChaScore4: { sint32 val = character->getMaxScore(SCORES::cha_score4); ret = NLMISC::toString("%d", val? 100 * character->getCurrentScore(SCORES::cha_score4) / val:0);} break; // Skills case CQueryEgs::BestSkillLevel: diff --git a/code/ryzom/server/src/entities_game_service/forage_progress.cpp b/code/ryzom/server/src/entities_game_service/forage_progress.cpp index a3e3a739d..e08943614 100644 --- a/code/ryzom/server/src/entities_game_service/forage_progress.cpp +++ b/code/ryzom/server/src/entities_game_service/forage_progress.cpp @@ -31,7 +31,7 @@ using namespace NLMISC; using namespace std; -CVariable ForageFocusAutoRegenRatio( "egs", "ForageFocusAutoRegenRatio", "Ratio of auto-regen of focus after an extraction", 1.0, 0, true ); +CVariable ForageChaScore4AutoRegenRatio( "egs", "ForageChaScore4AutoRegenRatio", "Ratio of auto-regen of ChaScore4 after an extraction", 1.0, 0, true ); NL_INSTANCE_COUNTER_IMPL(CForageProgress); @@ -45,13 +45,13 @@ static uint QualityStatsQtty [NB_QUALITY_STATS]; /* * Reset */ -void CForageProgress::reset( const NLMISC::CSheetId& material, const TDataSetRow& sourceRowId, sint32 initialFocus ) +void CForageProgress::reset( const NLMISC::CSheetId& material, const TDataSetRow& sourceRowId, sint32 initialChaScore4 ) { _Material = material; _SourceRowId = sourceRowId; _Amount = 0; _Quality = 1.0f; - _InitialFocus = initialFocus; + _InitialChaScore4 = initialChaScore4; _ResultCanBeTaken = false; _HasCastedUsefulCare = false; } @@ -158,9 +158,9 @@ void CForageProgress::reportXP( CCharacter *extractor, const CHarvestSource *sou if ( source->wasProspected() ) { // Give energy back! - SCharacteristicsAndScores& focus = extractor->getScores()._PhysicalScores[SCORES::focus]; - if ( focus.Current < initialFocus() ) - focus.Current = focus.Current() + (sint32)(ForageFocusAutoRegenRatio.get() * (float)(initialFocus()-focus.Current)); + SCharacteristicsAndScores& ChaScore4 = extractor->getScores()._PhysicalScores[SCORES::cha_score4]; + if ( ChaScore4.Current < initialChaScore4() ) + ChaScore4.Current = ChaScore4.Current() + (sint32)(ForageChaScore4AutoRegenRatio.get() * (float)(initialChaScore4()-ChaScore4.Current)); } // Give XP to care casters @@ -178,9 +178,9 @@ void CForageProgress::reportXP( CCharacter *extractor, const CHarvestSource *sou if ( source->wasProspected() && careCaster->forageProgress() ) { // Give energy back! - SCharacteristicsAndScores& focus = careCaster->getScores()._PhysicalScores[SCORES::focus]; - if ( focus.Current < careCaster->forageProgress()->initialFocus() ) - focus.Current = focus.Current() + (sint32)(ForageFocusAutoRegenRatio.get() * (float)(careCaster->forageProgress()->initialFocus()-focus.Current)); + SCharacteristicsAndScores& ChaScore4 = careCaster->getScores()._PhysicalScores[SCORES::cha_score4]; + if ( ChaScore4.Current < careCaster->forageProgress()->initialChaScore4() ) + ChaScore4.Current = ChaScore4.Current() + (sint32)(ForageChaScore4AutoRegenRatio.get() * (float)(careCaster->forageProgress()->initialChaScore4()-ChaScore4.Current)); } } diff --git a/code/ryzom/server/src/entities_game_service/forage_progress.h b/code/ryzom/server/src/entities_game_service/forage_progress.h index 4e3909e62..37be7e69e 100644 --- a/code/ryzom/server/src/entities_game_service/forage_progress.h +++ b/code/ryzom/server/src/entities_game_service/forage_progress.h @@ -38,14 +38,14 @@ public: /// Constructor - CForageProgress( const NLMISC::CSheetId& material, const TDataSetRow& sourceRowId, SKILLS::ESkills usedSkill, sint32 initialFocus ) + CForageProgress( const NLMISC::CSheetId& material, const TDataSetRow& sourceRowId, SKILLS::ESkills usedSkill, sint32 initialChaScore4 ) { - reset( material, sourceRowId, initialFocus ); + reset( material, sourceRowId, initialChaScore4 ); _UsedSkill = usedSkill; } /// Reset - void reset( const NLMISC::CSheetId& material, const TDataSetRow& sourceRowId, sint32 initialFocus ); + void reset( const NLMISC::CSheetId& material, const TDataSetRow& sourceRowId, sint32 initialChaScore4 ); /// Add the result of an extraction action void fillFromExtraction( float quantity, float quality, CCharacter *player ); @@ -71,8 +71,8 @@ public: /// Return the quality uint16 quality() const { return (uint16)_Quality; } - /// Return the amount of focus the player has when the extraction started - sint32 initialFocus() const { return _InitialFocus; } + /// Return the amount of ChaScore4 the player has when the extraction started + sint32 initialChaScore4() const { return _InitialChaScore4; } /// Return true if the player has executed at least one useful care action bool hasCastedUsefulCare() const { return _HasCastedUsefulCare; } @@ -102,8 +102,8 @@ private: /// Skill used to forage SKILLS::ESkills _UsedSkill; - /// Amount of focus the player has when the extraction started - sint32 _InitialFocus; + /// Amount of ChaScore4 the player has when the extraction started + sint32 _InitialChaScore4; /// Forage tool used // CGameItemRefPtr _ForageToolUsed; diff --git a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp index 390916885..dfbda593a 100644 --- a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp +++ b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp @@ -138,10 +138,10 @@ CCraftParameters::CCraftParameters() DefensiveAfflictionPowerFactor = 0.0f; nbDefensiveAfflictionPowerFactor = 0; - HpBuff = 0; - SapBuff = 0; - StaBuff = 0; - FocusBuff = 0; + ChaScore1Buff = 0; + ChaScore2Buff = 0; + ChaScore3Buff = 0; + ChaScore4Buff = 0; } // **************************************************************************** @@ -197,10 +197,10 @@ void CItemCraftParameters::clear() DefensiveAfflictionCastingTimeFactor = 0.0f; DefensiveAfflictionPowerFactor = 0.0f; - HpBuff = 0; - SapBuff = 0; - StaBuff = 0; - FocusBuff = 0; + ChaScore1Buff = 0; + ChaScore2Buff = 0; + ChaScore3Buff = 0; + ChaScore4Buff = 0; } float CItemCraftParameters::getCraftParameterValue( RM_FABER_STAT_TYPE::TRMStatType statType ) const @@ -357,10 +357,10 @@ void CItemCraftParameters::serial(NLMISC::IStream &f) throw(NLMISC::EStream) f.serial( DefensiveAfflictionPowerFactor ); } - f.serial( HpBuff ); - f.serial( SapBuff ); - f.serial( StaBuff ); - f.serial( FocusBuff ); + f.serial( ChaScore1Buff ); + f.serial( ChaScore3Buff ); + f.serial( ChaScore2Buff ); + f.serial( ChaScore4Buff ); } // operator != @@ -432,13 +432,13 @@ bool CItemCraftParameters::operator==(const CItemCraftParameters &p) const return false; if ( DefensiveAfflictionPowerFactor != p.DefensiveAfflictionPowerFactor ) return false; - if ( HpBuff != p.HpBuff ) + if ( ChaScore1Buff != p.ChaScore1Buff ) return false; - if ( SapBuff != p.SapBuff ) + if ( ChaScore2Buff != p.ChaScore2Buff ) return false; - if ( StaBuff != p.StaBuff ) + if ( ChaScore3Buff != p.ChaScore3Buff ) return false; - if ( FocusBuff != p.FocusBuff ) + if ( ChaScore4Buff != p.ChaScore4Buff ) return false; return true; @@ -489,10 +489,10 @@ const CItemCraftParameters& CItemCraftParameters::operator = ( const CCraftParam } Color = DominanteColor; - HpBuff = p.HpBuff; - SapBuff = p.SapBuff; - StaBuff = p.StaBuff; - FocusBuff = p.FocusBuff; + ChaScore1Buff = p.ChaScore1Buff; + ChaScore2Buff = p.ChaScore2Buff; + ChaScore3Buff = p.ChaScore3Buff; + ChaScore3Buff = p.ChaScore3Buff; return *this; } @@ -875,7 +875,7 @@ void CGameItem::computeRequiredLevel() case ITEM_TYPE::MEDIUM_SLEEVES: case ITEM_TYPE::MEDIUM_VEST: case ITEM_TYPE::BUCKLER: - // Constitution requirement + // Cha1 requirement _RequiredCharacLevel = (uint16)floor(_Recommended / 1.5f); break; case ITEM_TYPE::HEAVY_BOOTS: @@ -885,7 +885,7 @@ void CGameItem::computeRequiredLevel() case ITEM_TYPE::HEAVY_VEST: case ITEM_TYPE::HEAVY_HELMET: case ITEM_TYPE::SHIELD: - // Constitution requirement + // Cha1 requirement _RequiredCharacLevel = (uint16)(max(0, ((sint)_Recommended-10))); break; default: @@ -899,11 +899,11 @@ void CGameItem::computeRequiredLevel() switch( _Form->Type ) { case ITEM_TYPE::MAGICIAN_STAFF: - // Intelligence requirement + // Cha3 requirement _RequiredCharacLevel = (uint16)(max(0, ((sint)_Recommended-10))); break; default: - // Strength requirement + // Cha2 requirement _RequiredCharacLevel = (uint16)(max(0, ((sint)_Recommended-10))); break; } @@ -979,8 +979,8 @@ void CGameItem::computeRequirementFromOldSystem() case ITEM_TYPE::MEDIUM_SLEEVES: case ITEM_TYPE::MEDIUM_VEST: case ITEM_TYPE::BUCKLER: - // Constitution requirement - _RequiredCharac = CHARACTERISTICS::constitution; + // Cha1 requirement + _RequiredCharac = CHARACTERISTICS::cha1; _RequiredCharacLevel = (uint16)floor(_Recommended / 1.5f); break; case ITEM_TYPE::HEAVY_BOOTS: @@ -990,8 +990,8 @@ void CGameItem::computeRequirementFromOldSystem() case ITEM_TYPE::HEAVY_VEST: case ITEM_TYPE::HEAVY_HELMET: case ITEM_TYPE::SHIELD: - // Constitution requirement - _RequiredCharac = CHARACTERISTICS::constitution; + // Cha1 requirement + _RequiredCharac = CHARACTERISTICS::cha1; _RequiredCharacLevel = (uint16)(max(0, ((sint)_Recommended-10))); break; default: @@ -1005,13 +1005,13 @@ void CGameItem::computeRequirementFromOldSystem() switch( _Form->Type ) { case ITEM_TYPE::MAGICIAN_STAFF: - // Intelligence requirement - _RequiredCharac = CHARACTERISTICS::intelligence; + // Cha3 requirement + _RequiredCharac = CHARACTERISTICS::cha3; _RequiredCharacLevel = (uint16)(max(0, ((sint)_Recommended-10))); break; default: - // Strength requirement - _RequiredCharac = CHARACTERISTICS::strength; + // Cha2 requirement + _RequiredCharac = CHARACTERISTICS::cha2; _RequiredCharacLevel = (uint16)(max(0, ((sint)_Recommended-10))); break; } @@ -1019,7 +1019,7 @@ void CGameItem::computeRequirementFromOldSystem() // **** RANGE_WEAPON case ITEMFAMILY::RANGE_WEAPON: - _RequiredCharac = CHARACTERISTICS::well_balanced; + _RequiredCharac = CHARACTERISTICS::cha2_reg; _RequiredCharacLevel = (uint16)(max(0, ((sint)_Recommended-10))); break; @@ -2564,7 +2564,8 @@ void CGameItem::dumpGameItemStats( const string& fileName ) { if( !fileName.empty() ) { - FILE *f = nlfopen(fileName, "w"); + FILE * f; + f = fopen(fileName.c_str(),"w"); if(f) { @@ -3947,32 +3948,32 @@ uint32 CGameItem::magicResistance(RESISTANCE_TYPE::TResistanceType resistanceTyp } //----------------------------------------------- -// armorHpBuff +// armorChaScore1Buff //----------------------------------------------- -sint32 CGameItem::armorHpBuff() const +sint32 CGameItem::armorChaScore1Buff() const { if (_Form == NULL || _Form->Family != ITEMFAMILY::ARMOR) return 0; nlassert(_Form->Armor != NULL); - sint32 hpBuff; + sint32 ChaScore1Buff; switch (_Form->Armor->ArmorType) { case ARMORTYPE::MEDIUM: - hpBuff = quality() / 2; + ChaScore1Buff = quality() / 2; break; case ARMORTYPE::HEAVY: - hpBuff = quality(); + ChaScore1Buff = quality(); break; default: - hpBuff = 0; + ChaScore1Buff = 0; break; } - return hpBuff; + return ChaScore1Buff; } //----------------------------------------------- diff --git a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.h b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.h index 635fbf74c..01d49f795 100644 --- a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.h +++ b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.h @@ -141,10 +141,10 @@ struct CCraftParameters uint32 nbPrimaryRootResistanceFactor; // armor and jewel buff - sint32 HpBuff; - sint32 SapBuff; - sint32 StaBuff; - sint32 FocusBuff; + sint32 ChaScore1Buff; + sint32 ChaScore2Buff; + sint32 ChaScore3Buff; + sint32 ChaScore4Buff; CCraftParameters(); }; @@ -213,10 +213,10 @@ struct CItemCraftParameters float DefensiveAfflictionPowerFactor; // armor and jewel buff - sint32 HpBuff; - sint32 SapBuff; - sint32 StaBuff; - sint32 FocusBuff; + sint32 ChaScore1Buff; + sint32 ChaScore2Buff; + sint32 ChaScore3Buff; + sint32 ChaScore4Buff; CItemCraftParameters(); @@ -470,18 +470,18 @@ public : // return resistance gived by item for a resistance type uint32 magicResistance(RESISTANCE_TYPE::TResistanceType resistanceType) const; - // get Hit points buff - sint32 hpBuff() const { return _CraftParameters == 0 ? 0 : _CraftParameters->HpBuff; } - // get Sap points buff - sint32 sapBuff() const { return _CraftParameters == 0 ? 0 : _CraftParameters->SapBuff; } - // get Sta points buff - sint32 staBuff() const { return _CraftParameters == 0 ? 0 : _CraftParameters->StaBuff; } - // get Hit points buff - sint32 focusBuff() const { return _CraftParameters == 0 ? 0 : _CraftParameters->FocusBuff; } + // get ChaScore1 points buff + sint32 ChaScore1Buff() const { return _CraftParameters == 0 ? 0 : _CraftParameters->ChaScore1Buff; } + // get ChaScore2 points buff + sint32 ChaScore2Buff() const { return _CraftParameters == 0 ? 0 : _CraftParameters->ChaScore2Buff; } + // get ChaScore3 points buff + sint32 ChaScore3Buff() const { return _CraftParameters == 0 ? 0 : _CraftParameters->ChaScore3Buff; } + // get ChaScore4 points buff + sint32 ChaScore4Buff() const { return _CraftParameters == 0 ? 0 : _CraftParameters->ChaScore4Buff; } - /// get the Hit points buff provided by armors - /// it must be added to hpBuff() which does not include this bonus - sint32 armorHpBuff() const; + /// get the ChaScore1 points buff provided by armors + /// it must be added to ChaScore1Buff() which does not include this bonus + sint32 armorChaScore1Buff() const; //get casting time factor for elemental spells float getElementalCastingTimeFactor() const;// { return _CraftParameters.ElementalCastingTimeFactor; } @@ -922,9 +922,9 @@ private: /// Recommended skill for use uint32 _Recommended; - /// current hit points + /// current HP mutable uint32 _HP; - /// lost hp floating part (kept for wear) + /// lost HP floating part (kept for wear) float _LostHPremains; /// current worn state ITEM_WORN_STATE::TItemWornState _CurrentWornState; diff --git a/code/ryzom/server/src/entities_game_service/harvest_source.cpp b/code/ryzom/server/src/entities_game_service/harvest_source.cpp index 3da4285b5..dcf1b6cd1 100644 --- a/code/ryzom/server/src/entities_game_service/harvest_source.cpp +++ b/code/ryzom/server/src/entities_game_service/harvest_source.cpp @@ -875,10 +875,10 @@ void CHarvestSource::extractMaterial( float *reqPosProps, float *absPosProps, fl CEntityBase *entity = CEntityBaseManager::getEntityBasePtr( extractingEntityRow ); // getEntityBasePtr() tests TheDataset.isAccessible( extractingEntity ) if ( entity ) { - float impactOnHP = ((float)lifeAbsorberRatio) * impact * 0.01f; - impact -= impactOnHP; - float dmgRatio = impactOnHP * ForageHPRatioPerSourceLifeImpact.get(); - sint32 dmg = (sint32)((float)entity->maxHp() * dmgRatio); + float impactOnChaScore1 = ((float)lifeAbsorberRatio) * impact * 0.01f; + impact -= impactOnChaScore1; + float dmgRatio = impactOnChaScore1 * ForageChaScore1RatioPerSourceLifeImpact.get(); + sint32 dmg = (sint32)((float)entity->maxChaScore1() * dmgRatio); if ( dmg != 0 ) CHarvestSource::hitEntity( RYZOMID::forageSource, entity, dmg, dmg, true ); } @@ -1172,22 +1172,22 @@ uint16 CHarvestSource::getStatQuality() const /* * Damage an entity */ -void CHarvestSource::hitEntity( RYZOMID::TTypeId aggressorType, CEntityBase *entity, sint32 hpDamageAmount, sint32 hpDamageAmountWithoutArmour, bool isIntentional, sint32 hpAvoided ) +void CHarvestSource::hitEntity( RYZOMID::TTypeId aggressorType, CEntityBase *entity, sint32 ChaScore1DamageAmount, sint32 ChaScore1DamageAmountWithoutArmour, bool isIntentional, sint32 ChaScore1Avoided ) { H_AUTO(CHarvestSource_hitEntity); if ( entity->isDead()) return; - bool killed = entity->changeCurrentHp( -hpDamageAmount ); + bool killed = entity->changeCurrentChaScore1( -ChaScore1DamageAmount ); if ( isIntentional ) { SM_STATIC_PARAMS_1(params, STRING_MANAGER::integer); - params[0].Int = hpDamageAmount; + params[0].Int = ChaScore1DamageAmount; PHRASE_UTILITIES::sendDynamicSystemMessage( entity->getEntityRowId(), "FORAGE_ABSORB_DMG", params ); } else - PHRASE_UTILITIES::sendNaturalEventHitMessages( aggressorType, entity->getEntityRowId(), hpDamageAmount, hpDamageAmountWithoutArmour, hpAvoided ); + PHRASE_UTILITIES::sendNaturalEventHitMessages( aggressorType, entity->getEntityRowId(), ChaScore1DamageAmount, ChaScore1DamageAmountWithoutArmour, ChaScore1Avoided ); if ( killed ) PHRASE_UTILITIES::sendDeathMessages( TDataSetRow(), entity->getEntityRowId() ); } @@ -1240,8 +1240,8 @@ bool forageTestDoExtract( } // Request and output results - FILE *f = nlfopen(getLogDirectory() + "forage_test.csv", "at" ); - FILE *f2 = nlfopen(getLogDirectory() + "forage_test.log", "at" ); + FILE *f = fopen( std::string(getLogDirectory() + "forage_test.csv").c_str(), "at" ); + FILE *f2 = fopen( std::string(getLogDirectory() + "forage_test.log").c_str(), "at" ); float reqS = 1.0f / (reqPeriod * 10.0f); float req [CHarvestSource::NbPosRTProps]; float abs [CHarvestSource::NbPosRTProps]; diff --git a/code/ryzom/server/src/entities_game_service/harvest_source.h b/code/ryzom/server/src/entities_game_service/harvest_source.h index 8f5c4e529..da5a773a4 100644 --- a/code/ryzom/server/src/entities_game_service/harvest_source.h +++ b/code/ryzom/server/src/entities_game_service/harvest_source.h @@ -202,7 +202,7 @@ public: void reduceBlowingUpDmg( float ratio ); /// Damage an entity - static void hitEntity( RYZOMID::TTypeId aggressorType, CEntityBase *entity, sint32 hpDamageAmount, sint32 hpDamageAmountWithoutArmour, bool isIntentional, sint32 hpAvoided=0 ); + static void hitEntity( RYZOMID::TTypeId aggressorType, CEntityBase *entity, sint32 ChaScore1DamageAmount, sint32 ChaScore1DamageAmountWithoutArmour, bool isIntentional, sint32 ChaScore1Avoided=0 ); /// Recalculate the remaining extraction time depending on the requested quality void recalcExtractionTime( float requestedQuality ); diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_item.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_item.cpp index eb6a97f05..c4b3550e2 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_item.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_item.cpp @@ -100,14 +100,14 @@ bool CMissionItem::buildFromScript( const std::vector & script, std else if( !nlstricmp(args[0],"MaxPiercingProtection" ) ) _Params.MaxPiercingProtection = (float)atof(args[1].c_str()); - else if( !nlstricmp(args[0],"HpBuff" ) ) - NLMISC::fromString(args[1], _Params.HpBuff); - else if( !nlstricmp(args[0],"SapBuff" ) ) - NLMISC::fromString(args[1], _Params.SapBuff); - else if( !nlstricmp(args[0],"StaBuff" ) ) - NLMISC::fromString(args[1], _Params.StaBuff); - else if( !nlstricmp(args[0],"FocusBuff" ) ) - NLMISC::fromString(args[1], _Params.FocusBuff); + else if( !nlstricmp(args[0],"ChaScore1Buff" ) ) + NLMISC::fromString(args[1], _Params.ChaScore1Buff); + else if( !nlstricmp(args[0],"ChaScore2Buff" ) ) + NLMISC::fromString(args[1], _Params.ChaScore2Buff); + else if( !nlstricmp(args[0],"ChaScore3Buff" ) ) + NLMISC::fromString(args[1], _Params.ChaScore3Buff); + else if( !nlstricmp(args[0],"ChaScore4Buff" ) ) + NLMISC::fromString(args[1], _Params.ChaScore4Buff); else if( !nlstricmp(args[0],"Color" ) ) { uint8 color; diff --git a/code/ryzom/server/src/entities_game_service/outpost_manager/outpost_building.cpp b/code/ryzom/server/src/entities_game_service/outpost_manager/outpost_building.cpp index eb852bacd..eab2d19bd 100644 --- a/code/ryzom/server/src/entities_game_service/outpost_manager/outpost_building.cpp +++ b/code/ryzom/server/src/entities_game_service/outpost_manager/outpost_building.cpp @@ -140,8 +140,8 @@ void COutpostBuilding::update(uint32 nCurrentTime) if (cur == 0) cur = 1; - _BotObject->getPhysScores()._PhysicalScores[SCORES::hit_points].Current.directAccessForStructMembers() = cur; - _BotObject->getPhysScores()._PhysicalScores[SCORES::hit_points].Max.directAccessForStructMembers() = max; + _BotObject->getPhysScores()._PhysicalScores[SCORES::cha_score1].Current.directAccessForStructMembers() = cur; + _BotObject->getPhysScores()._PhysicalScores[SCORES::cha_score1].Max.directAccessForStructMembers() = max; } } return; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/aura_regen_effect.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/aura_regen_effect.cpp index 0216e95b9..36d5efe5e 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/aura_regen_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/aura_regen_effect.cpp @@ -84,6 +84,6 @@ void CRegenAuraEffect::removed() } -CAuraEffectTFactory *CLifeAuraEffectFactoryInstance = new CAuraEffectTFactory(POWERS::LifeAura); -CAuraEffectTFactory *CStaminaAuraEffectFactoryInstance = new CAuraEffectTFactory(POWERS::StaminaAura); -CAuraEffectTFactory *CSapAuraEffectFactoryInstance = new CAuraEffectTFactory(POWERS::SapAura); +CAuraEffectTFactory *CChaScore1AuraEffectFactoryInstance = new CAuraEffectTFactory(POWERS::ChaScore1Aura); +CAuraEffectTFactory *CChaScore2AuraEffectFactoryInstance = new CAuraEffectTFactory(POWERS::ChaScore2Aura); +CAuraEffectTFactory *CChaScore3AuraEffectFactoryInstance = new CAuraEffectTFactory(POWERS::ChaScore3Aura); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/aura_regen_effect.h b/code/ryzom/server/src/entities_game_service/phrase_manager/aura_regen_effect.h index 7fa89097b..1fd4d2904 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/aura_regen_effect.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/aura_regen_effect.h @@ -38,14 +38,14 @@ public: switch(_PowerType) { - case POWERS::LifeAura: - _AffectedScore = SCORES::hit_points; + case POWERS::ChaScore1Aura: + _AffectedScore = SCORES::cha_score1; break; - case POWERS::StaminaAura: - _AffectedScore = SCORES::stamina; + case POWERS::ChaScore2Aura: + _AffectedScore = SCORES::cha_score2; break; - case POWERS::SapAura: - _AffectedScore = SCORES::sap; + case POWERS::ChaScore3Aura: + _AffectedScore = SCORES::cha_score3; break; default: nlwarning("CRegenAuraEffect : cannot manage power type %s", POWERS::toString(_PowerType).c_str()); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/bleed_effect.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/bleed_effect.cpp index 9203a8127..0da04b63a 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/bleed_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/bleed_effect.cpp @@ -64,7 +64,7 @@ bool CBleedEffect::update(CTimerEvent * event, bool applyEffect) ++damage; } - // remove hp + // remove ChaScore1 if ( damage > 0 && _BleedingEntity != NULL) { // send messages @@ -73,7 +73,7 @@ bool CBleedEffect::update(CTimerEvent * event, bool applyEffect) { SM_STATIC_PARAMS_1(params, STRING_MANAGER::integer); params[0].Int = damage; - PHRASE_UTILITIES::sendDynamicSystemMessage( _BleedingEntity->getEntityRowId(), "EFFECT_BLEED_LOSE_HP", params); + PHRASE_UTILITIES::sendDynamicSystemMessage( _BleedingEntity->getEntityRowId(), "EFFECT_BLEED_LOSE_ChaScore1", params); } // to actor if ( _CreatorRowId != _TargetRowId && _CreatorRowId.isValid() && TheDataset.isDataSetRowStillValid(_CreatorRowId)) @@ -84,12 +84,12 @@ bool CBleedEffect::update(CTimerEvent * event, bool applyEffect) SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias( _BleedingEntity->getId(), CAIAliasTranslator::getInstance()->getAIAlias(_BleedingEntity->getId()) ); params[1].Int = damage; - PHRASE_UTILITIES::sendDynamicSystemMessage( actor->getEntityRowId(), "EFFECT_BLEED_LOSE_HP_ACTOR", params); + PHRASE_UTILITIES::sendDynamicSystemMessage( actor->getEntityRowId(), "EFFECT_BLEED_LOSE_ChaScore1_ACTOR", params); } } - // remove HP - if (_BleedingEntity->changeCurrentHp( (-1) * damage, _CreatorRowId)) + // remove ChaScore1 + if (_BleedingEntity->changeCurrentChaScore1( (-1) * damage, _CreatorRowId)) { // killed entity, so this effect and all other effects have been cleared send kill message and return true PHRASE_UTILITIES::sendDeathMessages( _CreatorRowId, _TargetRowId); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/bleed_effect.h b/code/ryzom/server/src/entities_game_service/phrase_manager/bleed_effect.h index 513a51adb..22a40e277 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/bleed_effect.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/bleed_effect.h @@ -28,7 +28,7 @@ struct CSlaveBleedEffect { CSlaveBleedEffect() : CycleDamage(0.0f), EndDate(0) {} - /// number of hp lost by target each cycle + /// number of ChaScore1 lost by target each cycle float CycleDamage; /// effect end date NLMISC::TGameCycle EndDate; @@ -100,9 +100,9 @@ private: /// cycle lenght in ticks NLMISC::TGameCycle _CycleLength; - /// number of hp lost by target each cycle + /// number of ChaScore1 lost by target each cycle float _CycleDamage; - /// fraction of hp when not integer (0-1) + /// fraction of ChaScore1 when not integer (0-1) float _RemainingDamage; /// affected entity diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_bleed.h b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_bleed.h index 863e18133..8641aadf4 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_bleed.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_bleed.h @@ -67,7 +67,7 @@ private: /// bleed total duration (in ticks) NLMISC::TGameCycle _BleedDuration; - /// time between two hp loss (in ticks) + /// time between two ChaScore1 loss (in ticks) NLMISC::TGameCycle _BleedCycleDuration; // temp vars diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_special_damage.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_special_damage.cpp index 5252ae87a..de18d11da 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_special_damage.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_special_damage.cpp @@ -225,7 +225,7 @@ void CCombatActionSpecialDamage::applyOnTarget(uint8 targetIndex, CCombatPhrase } // inflict damage on target - if ( entity->changeCurrentHp( -damage, _ActorRowId) ) + if ( entity->changeCurrentChaScore1( -damage, _ActorRowId) ) { PHRASE_UTILITIES::sendDeathMessages(_ActorRowId,entity->getEntityRowId()); if (targetIndex == 0) diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_bleed_effect.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_bleed_effect.cpp index d895e2542..2730ab5f2 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_bleed_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_bleed_effect.cpp @@ -54,10 +54,10 @@ bool CCombatBleedEffect::update( uint32 & updateFlag ) { _NextCycleDate = time + _CycleLength; - // remove hp + // remove ChaScore1 if (_BleedingEntity) { - _BleedingEntity->changeCurrentHp( (-1) * _CycleDamage, _CreatorRowId); + _BleedingEntity->changeCurrentChaScore1( (-1) * _CycleDamage, _CreatorRowId); // send messages // to target @@ -65,7 +65,7 @@ bool CCombatBleedEffect::update( uint32 & updateFlag ) { SM_STATIC_PARAMS_1(params, STRING_MANAGER::integer) params[0].Int = _CycleDamage; - PHRASE_UTILITIES::sendDynamicSystemMessage( _BleedingEntity->getEntityRowId(), "EFFECT_BLEED_LOSE_HP", params); + PHRASE_UTILITIES::sendDynamicSystemMessage( _BleedingEntity->getEntityRowId(), "EFFECT_BLEED_LOSE_ChaScore1", params); } // to actor if ( _CreatorRowId != _TargetRowId && TheDataset.isAccessible(_CreatorRowId)) @@ -76,7 +76,7 @@ bool CCombatBleedEffect::update( uint32 & updateFlag ) SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer) params[0].EId = _BleedingEntity->getId(); params[1].Int = _CycleDamage; - PHRASE_UTILITIES::sendDynamicSystemMessage( actor->getEntityRowId(), "EFFECT_BLEED_LOSE_HP_ACTOR", params); + PHRASE_UTILITIES::sendDynamicSystemMessage( actor->getEntityRowId(), "EFFECT_BLEED_LOSE_ChaScore1_ACTOR", params); } } } diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_bleed_effect.h b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_bleed_effect.h index 2642073c2..f2a2e99dc 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_bleed_effect.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_bleed_effect.h @@ -76,13 +76,13 @@ private: /// effect end date in ticks NLMISC::TGameCycle _BleedEndDate; - /// next cycle date (for hp loss) + /// next cycle date (for ChaScore1 loss) NLMISC::TGameCycle _NextCycleDate; /// cycle lenght in ticks NLMISC::TGameCycle _CycleLength; - /// number of hp lost by target each cycle + /// number of ChaScore1 lost by target each cycle uint16 _CycleDamage; /// affected entity diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.cpp index 0e34f243f..fb1a9c230 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.cpp @@ -371,8 +371,8 @@ void CCombatPhrase::init() _CyclicPhrase = false; _Idle = false; _TargetTooFarMsg = false; - _NotEnoughStaminaMsg = false; - _NotEnoughHpMsg = false; + _NotEnoughChaScore2Msg = false; + _NotEnoughChaScore1Msg = false; _NoAmmoMsg = false; _BadOrientationMsg = false; _CurrentTargetIsValid = false; @@ -390,16 +390,16 @@ void CCombatPhrase::init() _SabrinaRelativeCredit = 1.0f; _BrickMaxSabrinaCost = 0; - _HPCost = 0; - _StaminaCost = 0; - _StaminaWeightFactorCost = 0.0f; + _ChaScore1Cost = 0; + _ChaScore2Cost = 0; + _ChaScore2WeightFactorCost = 0.0f; _ExecutionLengthModifier = 0; _HitRateModifier = 0; _DamageModifier = 0; - _TotalStaminaCost = 0; - _TotalHPCost = 0; + _TotalChaScore2Cost = 0; + _TotalChaScore1Cost = 0; _TotalSabrinaCost = 0; _LatencyFactor = 1.0f; @@ -477,19 +477,19 @@ void CCombatPhrase::addBrick( const CStaticBrick &brick ) const TBrickParam::IId* param = brick.Params[i]; switch(param->id()) { - case TBrickParam::HP: -// INFOLOG("HP: %i",((CSBrickParamHp *)param)->Hp); - _HPCost += ((CSBrickParamHp *)param)->Hp; + case TBrickParam::ChaScore1: +// INFOLOG("ChaScore1: %i",((CSBrickParamChaScore1 *)param)->ChaScore1); + _ChaScore1Cost += ((CSBrickParamChaScore1 *)param)->ChaScore1; break; - case TBrickParam::STA: -// INFOLOG("STA: %i",((CSBrickParamSta *)param)->Sta); - _StaminaCost += ((CSBrickParamSta *)param)->Sta; + case TBrickParam::ChaScore2: +// INFOLOG("ChaScore2: %i",((CSBrickParamChaScore2 *)param)->ChaScore2); + _ChaScore2Cost += ((CSBrickParamChaScore2 *)param)->ChaScore2; break; - case TBrickParam::STA_WEIGHT_FACTOR: - _StaminaCost += ((CSBrickParamStaWeightFactor *)param)->StaConst; - _StaminaWeightFactorCost += ((CSBrickParamStaWeightFactor *)param)->StaFactor; + case TBrickParam::ChaScore2_WEIGHT_FACTOR: + _ChaScore2Cost += ((CSBrickParamChaScore2WeightFactor *)param)->ChaScore2Const; + _ChaScore2WeightFactorCost += ((CSBrickParamChaScore2WeightFactor *)param)->ChaScore2Factor; break; case TBrickParam::SET_BEHAVIOUR: @@ -583,16 +583,16 @@ void CCombatPhrase::addBrick( const CStaticBrick &brick ) _LatencyFactorDyn.MaxValue = ((CSBrickParamLatencyFactor *)param)->MaxLatencyFactor; break; - case TBrickParam::STA_LOSS_FACTOR: - _StaminaLossDynFactor.PowerValue = brick.PowerValue; - _StaminaLossDynFactor.MinValue = ((CSBrickParamStaLossFactor *)param)->MinFactor; - _StaminaLossDynFactor.MaxValue = ((CSBrickParamStaLossFactor *)param)->MaxFactor; + case TBrickParam::ChaScore2_LOSS_FACTOR: + _ChaScore2LossDynFactor.PowerValue = brick.PowerValue; + _ChaScore2LossDynFactor.MinValue = ((CSBrickParamChaScore2LossFactor *)param)->MinFactor; + _ChaScore2LossDynFactor.MaxValue = ((CSBrickParamChaScore2LossFactor *)param)->MaxFactor; break; - case TBrickParam::SAP_LOSS_FACTOR: - _SapLossDynFactor.PowerValue = brick.PowerValue; - _SapLossDynFactor.MinValue = ((CSBrickParamSapLossFactor *)param)->MinFactor; - _SapLossDynFactor.MaxValue = ((CSBrickParamSapLossFactor *)param)->MaxFactor; + case TBrickParam::ChaScore3_LOSS_FACTOR: + _ChaScore3LossDynFactor.PowerValue = brick.PowerValue; + _ChaScore3LossDynFactor.MinValue = ((CSBrickParamChaScore3LossFactor *)param)->MinFactor; + _ChaScore3LossDynFactor.MaxValue = ((CSBrickParamChaScore3LossFactor *)param)->MaxFactor; break; case TBrickParam::ATT_SKILL_MOD: @@ -738,7 +738,7 @@ void CCombatPhrase::addBrick( const CStaticBrick &brick ) case TBrickParam::DEBUFF_REGEN: { // $*STRUCT CSBrickParamDebuffRegen: public TBrickParam::CId - // $*-s std::string Score // affected score regen (Sap, Stamina, HitPoints, Focus) + // $*-s std::string Score // affected score regen (ChaScore3, ChaScore2, ChaScore1, ChaScore4) // $*-f float Duration = 0.0 // duration in seconds // $*-f float MinFactor = 0.0 // min factor of regen debuff // $*-f float MaxFactor = 0.0 // max factor of regen debuff @@ -755,17 +755,17 @@ void CCombatPhrase::addBrick( const CStaticBrick &brick ) EFFECT_FAMILIES::TEffectFamily family = EFFECT_FAMILIES::Unknown; switch(score) { - case SCORES::sap: - family = EFFECT_FAMILIES::CombatDebuffSapRegen; + case SCORES::cha_score3: + family = EFFECT_FAMILIES::CombatDebuffChaScore3Regen; break; - case SCORES::stamina: - family = EFFECT_FAMILIES::CombatDebuffStaminaRegen; + case SCORES::cha_score2: + family = EFFECT_FAMILIES::CombatDebuffChaScore2Regen; break; - case SCORES::hit_points: - family = EFFECT_FAMILIES::CombatDebuffHitPointsRegen; + case SCORES::cha_score1: + family = EFFECT_FAMILIES::CombatDebuffChaScore1Regen; break; - case SCORES::focus: - family = EFFECT_FAMILIES::CombatDebuffFocusRegen; + case SCORES::cha_score4: + family = EFFECT_FAMILIES::CombatDebuffChaScore4Regen; break; default: break; @@ -889,8 +889,8 @@ bool CCombatPhrase::evaluate() _AttackSkill = SKILLS::unknown; _Validated = false; _TargetTooFarMsg = false; - _NotEnoughStaminaMsg = false; - _NotEnoughHpMsg = false; + _NotEnoughChaScore2Msg = false; + _NotEnoughChaScore1Msg = false; _DisengageOnEnd = false; _LatencyEndDate = 0; _ExecutionEndDate = 0; @@ -1272,10 +1272,10 @@ bool CCombatPhrase::validate() } } - _TotalStaminaCost = _StaminaCost + (uint32)(_StaminaWeightFactorCost * _Attacker->getEntity()->getWeightOfEquippedWeapon() / 1000 ); - _TotalHPCost = _HPCost; + _TotalChaScore2Cost = _ChaScore2Cost + (uint32)(_ChaScore2WeightFactorCost * _Attacker->getEntity()->getWeightOfEquippedWeapon() / 1000 ); + _TotalChaScore1Cost = _ChaScore1Cost; - // if attacker is a player, use equipment wear malus on stamina and Hp cost + // if attacker is a player, use equipment wear malus on ChaScore1 and ChaScore2 cost if (actingEntity->getId().getType() == RYZOMID::player) { CCharacter *character = dynamic_cast (actingEntity); @@ -1286,21 +1286,21 @@ bool CCombatPhrase::validate() else { const float factor = 1.0f + 0.5f * character->wearMalus(); - _TotalStaminaCost = sint32( _TotalStaminaCost * factor ); - _TotalHPCost = sint32( _TotalHPCost * factor ); + _TotalChaScore2Cost = sint32( _TotalChaScore2Cost * factor ); + _TotalChaScore1Cost = sint32( _TotalChaScore1Cost * factor ); } } if(!checkPhraseCost(errorCode)) { - if (!_NotEnoughStaminaMsg && errorCode == "EGS_TOO_EXPENSIVE_STAMINA") + if (!_NotEnoughChaScore2Msg && errorCode == "EGS_TOO_EXPENSIVE_ChaScore2") { - _NotEnoughStaminaMsg = true; + _NotEnoughChaScore2Msg = true; PHRASE_UTILITIES::sendSimpleMessage( _Attacker->getEntityRowId(), errorCode ); } - else if (!_NotEnoughHpMsg && errorCode == "EGS_TOO_EXPENSIVE_HP") + else if (!_NotEnoughChaScore1Msg && errorCode == "EGS_TOO_EXPENSIVE_ChaScore1") { - _NotEnoughHpMsg = true; + _NotEnoughChaScore1Msg = true; PHRASE_UTILITIES::sendSimpleMessage( _Attacker->getEntityRowId(), errorCode ); } @@ -1482,14 +1482,14 @@ bool CCombatPhrase::update() if(!checkPhraseCost(errorCode)) { debugStep = 16; - if (!_NotEnoughStaminaMsg && errorCode == "EGS_TOO_EXPENSIVE_STAMINA" && !_Idle ) + if (!_NotEnoughChaScore2Msg && errorCode == "EGS_TOO_EXPENSIVE_ChaScore2" && !_Idle ) { - _NotEnoughStaminaMsg = true; + _NotEnoughChaScore2Msg = true; PHRASE_UTILITIES::sendSimpleMessage( actor->getId(), errorCode ); } - else if (!_NotEnoughHpMsg && errorCode == "EGS_TOO_EXPENSIVE_HP" && !_Idle ) + else if (!_NotEnoughChaScore1Msg && errorCode == "EGS_TOO_EXPENSIVE_ChaScore1" && !_Idle ) { - _NotEnoughHpMsg = true; + _NotEnoughChaScore1Msg = true; PHRASE_UTILITIES::sendSimpleMessage( actor->getId(), errorCode ); } _Idle = true; @@ -1746,26 +1746,26 @@ bool CCombatPhrase::launch() _TargetTooFarMsg = false; _Behaviour.Data = 0; _Behaviour.Data2 = 0; - _Behaviour.DeltaHP = 0; + _Behaviour.DeltaChaScore1 = 0; - // spend stamina, hp - if (_TotalStaminaCost != 0) + // spend ChaScore2, ChaScore1 + if (_TotalChaScore2Cost != 0) { - SCharacteristicsAndScores &stamina = actingEntity->getScores()._PhysicalScores[SCORES::stamina]; - if ( stamina.Current != 0 ) + SCharacteristicsAndScores &ChaScore2 = actingEntity->getScores()._PhysicalScores[SCORES::cha_score2]; + if ( ChaScore2.Current != 0 ) { - stamina.Current = stamina.Current - _TotalStaminaCost; - if (stamina.Current < 0) - stamina.Current = 0; + ChaScore2.Current = ChaScore2.Current - _TotalChaScore2Cost; + if (ChaScore2.Current < 0) + ChaScore2.Current = 0; } } - if ( _TotalHPCost != 0) + if ( _TotalChaScore1Cost != 0) { // acting entity should not be able to kill itself - const sint32 lostHp = min( _TotalHPCost, sint32(actingEntity->currentHp() - 1) ); + const sint32 lostChaScore1 = min( _TotalChaScore1Cost, sint32(actingEntity->currentChaScore1() - 1) ); - if ( actingEntity->changeCurrentHp( (lostHp) * (-1) ) ) + if ( actingEntity->changeCurrentChaScore1( (lostChaScore1) * (-1) ) ) { PHRASE_UTILITIES::sendDeathMessages( actingEntity->getEntityRowId(), actingEntity->getEntityRowId() ); return false; @@ -2467,8 +2467,8 @@ void CCombatPhrase::launchAttackOnTarget(uint8 targetIndex, bool rightHand, bool EGSPD::CPeople::TPeople targetRace = defender->getRace(); sint32 damage = 0; - sint32 lostStamina = 0; - sint32 lostSap = 0; + sint32 lostChaScore2 = 0; + sint32 lostChaScore3 = 0; bool killTarget = false; @@ -2761,16 +2761,16 @@ void CCombatPhrase::launchAttackOnTarget(uint8 targetIndex, bool rightHand, bool { if (_MeleeCombat) { - // in melee combat, post action delay is null: we know the hp the defender will have at the apply time - if (defender->currentHp() + _Behaviour.DeltaHP > 0) - _Behaviour.DeltaHP -= (sint16)damage; + // in melee combat, post action delay is null: we know the ChaScore1 the defender will have at the apply time + if (defender->currentChaScore1() + _Behaviour.DeltaChaScore1 > 0) + _Behaviour.DeltaChaScore1 -= (sint16)damage; } else { - _Behaviour.DeltaHP -= (sint16)damage; + _Behaviour.DeltaChaScore1 -= (sint16)damage; } - killTarget = ( defender->currentHp() <= -_Behaviour.DeltaHP ); + killTarget = ( defender->currentChaScore1() <= -_Behaviour.DeltaChaScore1 ); if (killTarget && mainTarget) { _Behaviour.Combat.KillingBlow = 1; @@ -2828,7 +2828,7 @@ void CCombatPhrase::apply() flushDelayedEvents(); // ??? must be done after flushDelayedEvents - _Behaviour.DeltaHP -= 10; + _Behaviour.DeltaChaScore1 -= 10; // first apply right hand attack, then left applyAttack(actingEntity, true); @@ -2903,7 +2903,7 @@ void CCombatPhrase::applyAttack(CEntityBase * actingEntity, bool rightHand) if (defender == NULL) continue; - defender->changeCurrentHp( -actions[i].InflictedDamage, actingEntity->getEntityRowId() ); + defender->changeCurrentChaScore1( -actions[i].InflictedDamage, actingEntity->getEntityRowId() ); // update target infos const uint targetIndex = actions[i].Target->getTargetIndex(); @@ -2969,7 +2969,7 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorsendDynamicSystemMessage(c->getId(), "UNEFFICENT_RANGE"); } } @@ -2986,8 +2986,8 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorgetRace()), action.HitLocalisation); - // test death but do not remove HP right now as report must be sent before killing target - killTarget = ( defender->currentHp() <= damage ); - // target do not die, check special effect and stamina and sap loss + // test death but do not remove ChaScore1 right now as report must be sent before killing target + killTarget = ( defender->currentChaScore1() <= damage ); + // target do not die, check special effect and ChaScore2 and ChaScore3 loss if ( !killTarget ) { // trigger special effect and break cast CPhraseManager::getInstance().breakCast(attackerLevel,actingEntity,defender); if( hitBodyPart != BODY::UnknownBodyPart ) { - applyLocalisationSpecialEffect(combatDefender, action.HitLocalisation, damage, lostStamina); + applyLocalisationSpecialEffect(combatDefender, action.HitLocalisation, damage, lostChaScore2); } - // sta and sap loss - if (_StaminaLossDynFactor.PowerValue > 0 ) + // ChaScore2 and ChaScore3 loss + if (_ChaScore2LossDynFactor.PowerValue > 0 ) { - lostStamina += (sint32)( damage * _StaminaLossDynFactor.applyValue(_WeaponSabrinaValue) ); + lostChaScore2 += (sint32)( damage * _ChaScore2LossDynFactor.applyValue(_WeaponSabrinaValue) ); } - if (_SapLossDynFactor.PowerValue > 0 ) + if (_ChaScore3LossDynFactor.PowerValue > 0 ) { - lostSap += (sint32)( damage * _SapLossDynFactor.applyValue(_WeaponSabrinaValue) ); + lostChaScore3 += (sint32)( damage * _ChaScore3LossDynFactor.applyValue(_WeaponSabrinaValue) ); } - if ( lostStamina != 0 ) + if ( lostChaScore2 != 0 ) { - INFOLOG(" entity %s lose %d stamina", TheDataset.getEntityId(defender->getEntityRowId()).toString().c_str(),lostStamina ); - defender->getPhysScores()._PhysicalScores[SCORES::stamina].Current = defender->getPhysScores()._PhysicalScores[SCORES::stamina].Current - lostStamina; + INFOLOG(" entity %s lose %d ChaScore2", TheDataset.getEntityId(defender->getEntityRowId()).toString().c_str(),lostChaScore2 ); + defender->getPhysScores()._PhysicalScores[SCORES::cha_score2].Current = defender->getPhysScores()._PhysicalScores[SCORES::cha_score2].Current - lostChaScore2; // clip score to 0 - if ( defender->getPhysScores()._PhysicalScores[SCORES::stamina].Current < 0 ) - defender->getPhysScores()._PhysicalScores[SCORES::stamina].Current = 0; + if ( defender->getPhysScores()._PhysicalScores[SCORES::cha_score2].Current < 0 ) + defender->getPhysScores()._PhysicalScores[SCORES::cha_score2].Current = 0; // add modifier to sentence AI event reports - _AiEventReport.addDelta(AI_EVENT_REPORT::Stamina, (-1)*lostStamina); + _AiEventReport.addDelta(AI_EVENT_REPORT::ChaScore3, (-1)*lostChaScore2); } - if ( lostSap != 0 ) + if ( lostChaScore3 != 0 ) { - //value = toString( _BaseSapAbsorption[i] ); - INFOLOG(" entity %s lose %d sap", TheDataset.getEntityId(defender->getEntityRowId()).toString().c_str(), lostSap ); - defender->getPhysScores()._PhysicalScores[SCORES::sap].Current = defender->getPhysScores()._PhysicalScores[SCORES::sap].Current - lostSap; + //value = toString( _BaseChaScore3Absorption[i] ); + INFOLOG(" entity %s lose %d ChaScore3", TheDataset.getEntityId(defender->getEntityRowId()).toString().c_str(), lostChaScore3 ); + defender->getPhysScores()._PhysicalScores[SCORES::cha_score3].Current = defender->getPhysScores()._PhysicalScores[SCORES::cha_score3].Current - lostChaScore3; // clip score to 0 - if ( defender->getPhysScores()._PhysicalScores[SCORES::sap].Current < 0 ) - defender->getPhysScores()._PhysicalScores[SCORES::sap].Current = 0; + if ( defender->getPhysScores()._PhysicalScores[SCORES::cha_score3].Current < 0 ) + defender->getPhysScores()._PhysicalScores[SCORES::cha_score3].Current = 0; // add modifier to sentence AI event reports - _AiEventReport.addDelta(AI_EVENT_REPORT::Sap, (-1)*lostSap); + _AiEventReport.addDelta(AI_EVENT_REPORT::ChaScore3, (-1)*lostChaScore3); } // send hit message - PHRASE_UTILITIES::sendHitMessages(actingEntity->getId(),targetId, _IsMad, damage, damageBeforeArmor, lostStamina, lostSap, hitBodyPart); + PHRASE_UTILITIES::sendHitMessages(actingEntity->getId(),targetId, _IsMad, damage, damageBeforeArmor, lostChaScore2, lostChaScore3, hitBodyPart); } - // target die from hit, only display HP damage and do not check special effect because of damage loc and critical hit + // target die from hit, only display ChaScore1 damage and do not check special effect because of damage loc and critical hit else { PHRASE_UTILITIES::sendHitMessages(actingEntity->getId(),targetId, _IsMad, damage, damageBeforeArmor, 0, 0, hitBodyPart); @@ -3107,9 +3107,9 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorcurrentHp()); - report.Sta = lostStamina; - report.Sap = lostSap; + report.ChaScore1 = std::min(damage, defender->currentChaScore1()); + report.ChaScore2 = lostChaScore2; + report.ChaScore3 = lostChaScore3; actionReports.push_back(report); } } @@ -3149,15 +3149,15 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorgetDamageShieldDamage() > 0) { - if ( defender->getDamageShieldHpDrain() > 0 && !defender->isDead() ) + if ( defender->getDamageShieldChaScore1Drain() > 0 && !defender->isDead() ) { - defender->changeCurrentHp(defender->getDamageShieldHpDrain()); - PHRASE_UTILITIES::sendDamageShieldDamageMessages( actingEntity->getId(), defender->getId(),defender->getDamageShieldDamage(), defender->getDamageShieldHpDrain()); + defender->changeCurrentChaScore1(defender->getDamageShieldChaScore1Drain()); + PHRASE_UTILITIES::sendDamageShieldDamageMessages( actingEntity->getId(), defender->getId(),defender->getDamageShieldDamage(), defender->getDamageShieldChaScore1Drain()); } else PHRASE_UTILITIES::sendDamageShieldDamageMessages( actingEntity->getId(), defender->getId(),defender->getDamageShieldDamage(), 0); - if ( actingEntity->changeCurrentHp( (-1) * defender->getDamageShieldDamage(), defender->getEntityRowId()) ) + if ( actingEntity->changeCurrentChaScore1( (-1) * defender->getDamageShieldDamage(), defender->getEntityRowId()) ) { PHRASE_UTILITIES::sendDeathMessages(defender->getId(), actingEntity->getId()); } @@ -3171,7 +3171,7 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorgetParamValue(); - if ( actingEntity->changeCurrentHp( (-1)*damage, defender->getEntityRowId() ) ) + if ( actingEntity->changeCurrentChaScore1( (-1)*damage, defender->getEntityRowId() ) ) { PHRASE_UTILITIES::sendHitMessages(defender->getId(),actingEntity->getId(), false, damage, damage, 0, 0); PHRASE_UTILITIES::sendDeathMessages( defender->getEntityRowId(), actingEntity->getEntityRowId() ); @@ -3232,7 +3232,7 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorgetEntityRowId(); targetInfos.MainTarget = /*mainTarget*/true; - // targetInfos.DmgHp = (sint32)enchant->getDmgBonus(); + // targetInfos.DmgChaScore1 = (sint32)enchant->getDmgBonus(); // targetInfos.ResistFactor = 1.f; // targetInfos.DmgFactor = 0.f; targetInfos.Immune = false; @@ -3243,10 +3243,10 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorgetDmgType(), (sint32)enchant->getDmgBonus(), actingEntity, /*rangeFactor*/1.f, /*powerFactor*/0.f)) @@ -3261,16 +3261,16 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorgetDmgType(), (sint32)enchant->getDmgBonus(), - /*_DmgSap*/0, - /*_DmgSta*/0, + /*_DmgChaScore3*/0, + /*_DmgChaScore2*/0, /*_VampirismValue*/0)) { - if (targetInfos.ReportAction.Hp != 0 || targetInfos.ReportAction.Sap != 0 || targetInfos.ReportAction.Sta != 0 || targetInfos.ReportAction.Focus != 0) + if (targetInfos.ReportAction.ChaScore1 != 0 || targetInfos.ReportAction.ChaScore2 != 0 || targetInfos.ReportAction.ChaScore3 != 0 || targetInfos.ReportAction.ChaScore4 != 0) { PROGRESSIONPVE::CCharacterProgressionPVE::getInstance()->actionReport(targetInfos.ReportAction); PROGRESSIONPVP::CCharacterProgressionPVP::getInstance()->reportAction(targetInfos.ReportAction); } - _Behaviour.DeltaHP -= (sint16)targetInfos.DmgHp; + _Behaviour.DeltaChaScore1 -= (sint16)targetInfos.DmgChaScore1; if ( _Behaviour.Behaviour != MBEHAV::UNKNOWN_BEHAVIOUR ) PHRASE_UTILITIES::sendUpdateBehaviour( actingEntity->getEntityRowId(), _Behaviour ); } @@ -3301,14 +3301,14 @@ void CCombatPhrase::applyAction(TApplyAction & action, std::vectorEffectArgFloat[0]) { - actingEntity->changeCurrentHp(damage); + actingEntity->changeCurrentChaScore1(damage); PHRASE_UTILITIES::sendItemSpecialEffectProcMessage(ITEM_SPECIAL_EFFECT::ISE_FIGHT_VAMPIRISM, actingEntity, defender, damage); } } } // compute aggro - computeAggro(_AiEventReport, defender, damage,lostStamina, lostSap); + computeAggro(_AiEventReport, defender, damage,lostChaScore2, lostChaScore3); } // applyAction // @@ -4033,17 +4033,17 @@ bool CCombatPhrase::checkPhraseCost( string &errorCode ) if ( TheDataset.getEntityId(_Attacker->getEntityRowId()).getType() != RYZOMID::player) return true; - const SCharacteristicsAndScores &stamina = _Attacker->getEntity()->getScores()._PhysicalScores[SCORES::stamina]; - if ( stamina.Current < _TotalStaminaCost) + const SCharacteristicsAndScores &ChaScore2 = _Attacker->getEntity()->getScores()._PhysicalScores[SCORES::cha_score2]; + if ( ChaScore2.Current < _TotalChaScore2Cost) { - errorCode = "EGS_TOO_EXPENSIVE_STAMINA"; + errorCode = "EGS_TOO_EXPENSIVE_ChaScore2"; return false; } - const SCharacteristicsAndScores &hp = _Attacker->getEntity()->getScores()._PhysicalScores[SCORES::hit_points]; - if ( hp.Current <= _TotalHPCost) + const SCharacteristicsAndScores &ChaScore1 = _Attacker->getEntity()->getScores()._PhysicalScores[SCORES::cha_score1]; + if ( ChaScore1.Current <= _TotalChaScore1Cost) { - errorCode = "EGS_TOO_EXPENSIVE_HP"; + errorCode = "EGS_TOO_EXPENSIVE_ChaScore1"; return false; } @@ -4182,7 +4182,7 @@ PHRASE_UTILITIES::TPairSlotShield CCombatPhrase::getHitLocalisation(CCombatDefen //-------------------------------------------------------------- // applyLocalisationSpecialEffect() //-------------------------------------------------------------- -void CCombatPhrase::applyLocalisationSpecialEffect( CCombatDefenderPtr &defender, SLOT_EQUIPMENT::TSlotEquipment slot, sint32 damage, sint32 &lostStamina) +void CCombatPhrase::applyLocalisationSpecialEffect( CCombatDefenderPtr &defender, SLOT_EQUIPMENT::TSlotEquipment slot, sint32 damage, sint32 &lostChaScore2) { H_AUTO(CCombatPhrase_applyLocalisationSpecialEffect); @@ -4207,10 +4207,10 @@ void CCombatPhrase::applyLocalisationSpecialEffect( CCombatDefenderPtr &defender } break; case SLOT_EQUIPMENT::CHEST: - // sta loss + // ChaScore2 loss { - lostStamina += (sint32) (damage * HitChestStaLossFactor); - DEBUGLOG("Entity %s, hit to chest, lose %d stamina", entity->getId().toString().c_str(), lostStamina); + lostChaScore2 += (sint32) (damage * HitChestChaScore2LossFactor); + DEBUGLOG("Entity %s, hit to chest, lose %d ChaScore2", entity->getId().toString().c_str(), lostChaScore2); } break; case SLOT_EQUIPMENT::ARMS: @@ -4625,7 +4625,7 @@ sint32 CCombatPhrase::applyDamageOnBodyguard(CEntityBase *actingEntity, TDataSet bool shieldIsEffective = testShieldEfficiency(bodyguard, shield); damageOnBodyguard = applyArmorProtections(bodyguard, damageOnBodyguard, dmgType, _HitLocalisation, shieldIsEffective); - if ( entity->changeCurrentHp( (-1)*damageOnBodyguard, actingEntity->getEntityRowId() ) ) + if ( entity->changeCurrentChaScore1( (-1)*damageOnBodyguard, actingEntity->getEntityRowId() ) ) { PHRASE_UTILITIES::sendHitMessages(actingEntity->getId(),entity->getId(), false, damageOnBodyguard, damageOnBodyguardBeforeArmor, 0, 0, hitBodyPart); PHRASE_UTILITIES::sendDeathMessages( _Attacker->getEntityRowId(), entity->getEntityRowId() ); @@ -4680,7 +4680,7 @@ void CCombatPhrase::applyBounceEffect(CEntityBase *actingEntity, sint32 attacker bool shieldIsEffective = testShieldEfficiency(combatTarget, shield); damage = applyArmorProtections(combatTarget, damage, dmgType, _HitLocalisation, shieldIsEffective); - if ( bounceTarget->changeCurrentHp( (-1)*damage, actingEntity->getEntityRowId() ) ) + if ( bounceTarget->changeCurrentChaScore1( (-1)*damage, actingEntity->getEntityRowId() ) ) { PHRASE_UTILITIES::sendHitMessages(actingEntity->getId(),bounceTarget->getId(), false, damage, damageBeforeArmor, 0, 0, hitBodyPart); PHRASE_UTILITIES::sendDeathMessages( _Attacker->getEntityRowId(), bounceTarget->getEntityRowId() ); @@ -4705,7 +4705,7 @@ void CCombatPhrase::applyBounceEffect(CEntityBase *actingEntity, sint32 attacker //-------------------------------------------------------------- // computeAggro() //-------------------------------------------------------------- -void CCombatPhrase::computeAggro(CAiEventReport &aiEventReport, CEntityBase *target, sint32 hpDamage, sint32 staDamage, sint32 sapDamage ) +void CCombatPhrase::computeAggro(CAiEventReport &aiEventReport, CEntityBase *target, sint32 ChaScore1Damage, sint32 ChaScore2Damage, sint32 ChaScore3Damage ) { H_AUTO(CCombatPhrase_computeAggro); @@ -4714,38 +4714,38 @@ void CCombatPhrase::computeAggro(CAiEventReport &aiEventReport, CEntityBase *tar #endif // compute aggro - float aggroHp = 0.0f; - float aggroSap = 0.0f; - float aggroSta = 0.0f; - if (hpDamage > 0) + float aggroChaScore1 = 0.0f; + float aggroChaScore2 = 0.0f; + float aggroChaScore3 = 0.0f; + if (ChaScore1Damage > 0) { - const sint32 maxPv = target->maxHp(); - if (maxPv) + const sint32 maxChaScore1 = target->maxChaScore1(); + if (maxChaScore1) { - aggroHp = min( 1.0f , float(hpDamage + _AggroModifier)/float(maxPv)); + aggroChaScore1 = min( 1.0f , float(ChaScore1Damage + _AggroModifier)/float(maxChaScore1)); } - aiEventReport.addDelta(AI_EVENT_REPORT::HitPoints, -hpDamage); + aiEventReport.addDelta(AI_EVENT_REPORT::ChaScore1, -ChaScore1Damage); } - if (sapDamage > 0) + if (ChaScore3Damage > 0) { - const sint32 maxSap = target->getPhysScores()._PhysicalScores[SCORES::sap].Max; - if (maxSap) + const sint32 maxChaScore3 = target->getPhysScores()._PhysicalScores[SCORES::cha_score3].Max; + if (maxChaScore3) { - aggroSap = min( 1.0f, float(sapDamage)/float(maxSap)); + aggroChaScore3 = min( 1.0f, float(ChaScore3Damage)/float(maxChaScore3)); } - aiEventReport.addDelta(AI_EVENT_REPORT::Sap, -sapDamage); + aiEventReport.addDelta(AI_EVENT_REPORT::ChaScore3, -ChaScore3Damage); } - if (staDamage > 0) + if (ChaScore2Damage > 0) { - const sint32 maxSta = target->getPhysScores()._PhysicalScores[SCORES::stamina].Max; - if (maxSta) + const sint32 maxChaScore2 = target->getPhysScores()._PhysicalScores[SCORES::cha_score2].Max; + if (maxChaScore2) { - aggroSta = min (1.0f, float(staDamage)/float(maxSta)); + aggroChaScore2 = min (1.0f, float(ChaScore2Damage)/float(maxChaScore2)); } - aiEventReport.addDelta(AI_EVENT_REPORT::Stamina, -staDamage); + aiEventReport.addDelta(AI_EVENT_REPORT::ChaScore2, -ChaScore2Damage); } - const float aggro = - min( 1.0f, _AggroMultiplier * (1.0f - (1.0f-aggroHp)*(1.0f-aggroSap)*(1.0f-aggroSta)) ); + const float aggro = - min( 1.0f, _AggroMultiplier * (1.0f - (1.0f-aggroChaScore1)*(1.0f-aggroChaScore2)*(1.0f-aggroChaScore3)) ); // update the ai event report aiEventReport.AggroAdd = aggro; @@ -4923,7 +4923,7 @@ void CCombatPhrase::flushDelayedEvents() { // don't send a flying text if some damage is done (for instance on another entity or with the left weapon) // don't send a flying text if not wanted - bool sendFlyingText= _Behaviour.DeltaHP==0 && ae.SendFlyingText; + bool sendFlyingText= _Behaviour.DeltaChaScore1==0 && ae.SendFlyingText; // don't send a dodge/parry flying text if both Miss and DodgeParry happened (eg: can happen if right weapon attack miss, and left weapon attack is dodged) if(ae.EventType!=EventEvade && _MissFlyingTextTriggered) sendFlyingText= false; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.h b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.h index b96dc8e0d..b43a607ab 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.h @@ -405,7 +405,7 @@ protected: /** * apply special effect due to localisation of the hit */ - void applyLocalisationSpecialEffect( CCombatDefenderPtr &defender, SLOT_EQUIPMENT::TSlotEquipment slot, sint32 damage, sint32 &lostStamina); + void applyLocalisationSpecialEffect( CCombatDefenderPtr &defender, SLOT_EQUIPMENT::TSlotEquipment slot, sint32 damage, sint32 &lostChaScore2); /** * apply defender armor damage reduction @@ -431,7 +431,7 @@ protected: void applyBounceEffect(CEntityBase *actingEntity, sint32 attackerLevel, CSEffectPtr effect, sint32 damage, DMGTYPE::EDamageType dmgType); /// compute and send aggro - void computeAggro(CAiEventReport &aiEventReport, CEntityBase *target, sint32 hpDamage, sint32 staDamage = 0, sint32 sapDamage = 0); + void computeAggro(CAiEventReport &aiEventReport, CEntityBase *target, sint32 ChaScore1Damage, sint32 ChaScore2Damage = 0, sint32 ChaScore3Damage = 0); /// compute base damage void computeBaseDamage(bool rightHand, EGSPD::CPeople::TPeople targetRace); @@ -477,14 +477,14 @@ protected: // Relative credit must be added to total credit float _SabrinaRelativeCredit; - /// stamina cost of the attack - sint32 _StaminaCost; + /// ChaScore2 cost of the attack + sint32 _ChaScore2Cost; - /// Stamina weapon weight cost factor - float _StaminaWeightFactorCost; + /// ChaScore2 weapon weight cost factor + float _ChaScore2WeightFactorCost; - // hp cost - sint32 _HPCost; + // ChaScore1 cost + sint32 _ChaScore1Cost; /// execution length modifier (in ticks) sint32 _ExecutionLengthModifier; @@ -527,10 +527,10 @@ protected: /// special hit, set to true to use special fx bool _SpecialHit; - /// stamina loss factor - CDynValue _StaminaLossDynFactor; - /// sap loss factor - CDynValue _SapLossDynFactor; + /// ChaScore2 loss factor + CDynValue _ChaScore2LossDynFactor; + /// ChaScore3 loss factor + CDynValue _ChaScore3LossDynFactor; /// opening needed std::vector _OpeningNeededFlags; @@ -589,8 +589,8 @@ protected: /// \name flags indicated if an error message has been sent already (when in idle mode) //@{ bool _TargetTooFarMsg; - bool _NotEnoughHpMsg; - bool _NotEnoughStaminaMsg; + bool _NotEnoughChaScore1Msg; + bool _NotEnoughChaScore2Msg; bool _NoAmmoMsg; bool _BadOrientationMsg; //}@ @@ -598,10 +598,10 @@ protected: bool _CurrentTargetIsValid; /// melee or range combat bool _MeleeCombat; - /// total stamina cost - sint32 _TotalStaminaCost; - /// total hp cost - sint32 _TotalHPCost; + /// total ChaScore2 cost + sint32 _TotalChaScore2Cost; + /// total ChaScore1 cost + sint32 _TotalChaScore1Cost; /// the total sabrina cost sint32 _TotalSabrinaCost; /// right weapon sabrina value diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/damage_aura_effect.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/damage_aura_effect.cpp index 6e0205fa6..0e791fc9a 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/damage_aura_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/damage_aura_effect.cpp @@ -89,18 +89,18 @@ bool CDamageAuraEffect::update(CTimerEvent * event, bool applyEffect) { params[0].setEIdAIAlias( _AffectedEntity->getId(), CAIAliasTranslator::getInstance()->getAIAlias(_AffectedEntity->getId()) ); params[1].Int = _CycleDamage; - PHRASE_UTILITIES::sendDynamicSystemMessage( entity->getEntityRowId(), "EFFECT_STENCH_LOSE_HP", params); + PHRASE_UTILITIES::sendDynamicSystemMessage( entity->getEntityRowId(), "EFFECT_STENCH_LOSE_ChaScore1", params); } // to stinking entity if (_AffectedEntity->getId().getType() == RYZOMID::player) { params[0].setEIdAIAlias( entity->getId(), CAIAliasTranslator::getInstance()->getAIAlias(entity->getId()) ); params[1].Int = _CycleDamage; - PHRASE_UTILITIES::sendDynamicSystemMessage( _TargetRowId, "EFFECT_STENCH_LOSE_HP_ACTOR", params); + PHRASE_UTILITIES::sendDynamicSystemMessage( _TargetRowId, "EFFECT_STENCH_LOSE_ChaScore1_ACTOR", params); } - // remove HP - if (entity->changeCurrentHp( -sint32(_CycleDamage), _TargetRowId)) + // remove ChaScore1 + if (entity->changeCurrentChaScore1( -sint32(_CycleDamage), _TargetRowId)) { // killed entity, so this effect and all other effects have been cleared send kill message and return true PHRASE_UTILITIES::sendDeathMessages( _TargetRowId, entity->getEntityRowId()); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/damage_aura_effect.h b/code/ryzom/server/src/entities_game_service/phrase_manager/damage_aura_effect.h index 02712b068..3ed07d2f6 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/damage_aura_effect.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/damage_aura_effect.h @@ -88,7 +88,7 @@ private: /// cycle lenght in ticks NLMISC::TGameCycle _CycleLength; - /// number of hp lost by surrounding entities each cycle + /// number of ChaScore1 lost by surrounding entities each cycle uint16 _CycleDamage; /// aura radius in meters diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/faber_action.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/faber_action.cpp index 2e3b9da5e..342b363cb 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/faber_action.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/faber_action.cpp @@ -260,7 +260,7 @@ public: report.DeltaLvl = deltaLvl; report.Skill = skill; report.factor = successFactor; - report.Focus = (uint32) phrase->getFocusCost(); + report.ChaScore4 = (uint32) phrase->getChaScore4Cost(); // as this is a craft action, the player must have a crafting tool in right hand CGameItemPtr tool = c->getRightHandItem(); @@ -487,16 +487,16 @@ protected: float buffFactor = successFactor * ((float)((sint32)min((sint32)phrase->getLowerRmQuality(),(sint32)phrase->getRecommendedSkill()))) / (float)phrase->getRecommendedSkill(); - Params.HpBuff = (sint32)( ( Params.HpBuff + phrase->getMBOHitPoint() ) * buffFactor ); - Params.SapBuff = (sint32)( ( Params.SapBuff + phrase->getMBOSap() ) * buffFactor ); - Params.StaBuff = (sint32)( ( Params.StaBuff + phrase->getMBOStamina() ) * buffFactor ); - Params.FocusBuff = (sint32)( ( Params.FocusBuff + phrase->getMBOFocus() ) * buffFactor ); + Params.ChaScore1Buff = (sint32)( ( Params.ChaScore1Buff + phrase->getMBOChaScore1() ) * buffFactor ); + Params.ChaScore2Buff = (sint32)( ( Params.ChaScore2Buff + phrase->getMBOChaScore2() ) * buffFactor ); + Params.ChaScore3Buff = (sint32)( ( Params.ChaScore3Buff + phrase->getMBOChaScore3() ) * buffFactor ); + Params.ChaScore4Buff = (sint32)( ( Params.ChaScore4Buff + phrase->getMBOChaScore4() ) * buffFactor ); // apply plan stat bonus - Params.HpBuff += sint32(phrase->getRootFaberPlan()->Faber->HpBonusPerLevel * finalItemQuality); - Params.SapBuff += sint32(phrase->getRootFaberPlan()->Faber->SapBonusPerLevel * finalItemQuality); - Params.StaBuff += sint32(phrase->getRootFaberPlan()->Faber->StaBonusPerLevel * finalItemQuality); - Params.FocusBuff += sint32(phrase->getRootFaberPlan()->Faber->FocusBonusPerLevel * finalItemQuality); + Params.ChaScore1Buff += sint32(phrase->getRootFaberPlan()->Faber->ChaScore1BonusPerLevel * finalItemQuality); + Params.ChaScore2Buff += sint32(phrase->getRootFaberPlan()->Faber->ChaScore2BonusPerLevel * finalItemQuality); + Params.ChaScore3Buff += sint32(phrase->getRootFaberPlan()->Faber->ChaScore3BonusPerLevel * finalItemQuality); + Params.ChaScore4Buff += sint32(phrase->getRootFaberPlan()->Faber->ChaScore4BonusPerLevel * finalItemQuality); // apply procs { @@ -516,29 +516,29 @@ protected: ITEM_TYPE::TItemType type = phrase->getCraftedItemStaticForm()->Type; if( type == ITEM_TYPE::MAGICIAN_STAFF ) { - scoresAllowed[SCORES::stamina]=false; - scoresAllowed[SCORES::focus]=false; + scoresAllowed[SCORES::cha_score2]=false; + scoresAllowed[SCORES::cha_score4]=false; } else if( type==ITEM_TYPE::HEAVY_BOOTS || type==ITEM_TYPE::HEAVY_GLOVES || type==ITEM_TYPE::HEAVY_PANTS || type==ITEM_TYPE::HEAVY_SLEEVES || type==ITEM_TYPE::HEAVY_VEST || type==ITEM_TYPE::HEAVY_HELMET ) { - scoresAllowed[SCORES::focus]=false; - scoresAllowed[SCORES::sap]=false; + scoresAllowed[SCORES::cha_score4]=false; + scoresAllowed[SCORES::cha_score3]=false; } else if( type==ITEM_TYPE::MEDIUM_BOOTS || type==ITEM_TYPE::MEDIUM_GLOVES || type==ITEM_TYPE::MEDIUM_PANTS || type==ITEM_TYPE::MEDIUM_SLEEVES || type==ITEM_TYPE::MEDIUM_VEST ) { - scoresAllowed[SCORES::focus]=false; + scoresAllowed[SCORES::cha_score4]=false; } else if( family==ITEMFAMILY::MELEE_WEAPON || family==ITEMFAMILY::RANGE_WEAPON || family==ITEMFAMILY::SHIELD ) { - scoresAllowed[SCORES::focus]=false; - scoresAllowed[SCORES::sap]=false; + scoresAllowed[SCORES::cha_score4]=false; + scoresAllowed[SCORES::cha_score3]=false; } else if( family==ITEMFAMILY::CRAFTING_TOOL || family==ITEMFAMILY::HARVEST_TOOL ) { - scoresAllowed[SCORES::hit_points]=false; - scoresAllowed[SCORES::stamina]=false; + scoresAllowed[SCORES::cha_score1]=false; + scoresAllowed[SCORES::cha_score2]=false; } // choose score using filtered random uint32 randomScoreIndex = (uint32)RandomGenerator.rand((uint16)(SCORES::NUM_SCORES-1)); @@ -550,10 +550,10 @@ protected: switch (stat) { - case SCORES::hit_points: pbuff = &Params.HpBuff; break; - case SCORES::stamina: pbuff = &Params.StaBuff; break; - case SCORES::sap: pbuff = &Params.SapBuff; break; - case SCORES::focus: pbuff = &Params.FocusBuff; break; + case SCORES::cha_score1: pbuff = &Params.ChaScore1Buff; break; + case SCORES::cha_score2: pbuff = &Params.ChaScore2Buff; break; + case SCORES::cha_score3: pbuff = &Params.ChaScore3Buff; break; + case SCORES::cha_score4: pbuff = &Params.ChaScore4Buff; break; } if (pbuff) *pbuff += (sint32)it->EffectArgFloat[1] + (sint32)max((uint16)1,(uint16)(finalItemQuality/10)); @@ -1301,11 +1301,11 @@ protected: params.nbStatEnergy += 1; } - // Add always impact on HpBuff (should always be NULL in MPs for now) - params.HpBuff += fp.HpBuff; - params.SapBuff += fp.SapBuff; - params.StaBuff += fp.StaBuff; - params.FocusBuff += fp.FocusBuff; + // Add always impact on ChaScore1Buff (should always be NULL in MPs for now) + params.ChaScore1Buff += fp.ChaScore1Buff; + params.ChaScore2Buff += fp.ChaScore2Buff; + params.ChaScore3Buff += fp.ChaScore3Buff; + params.ChaScore4Buff += fp.ChaScore4Buff; } }; @@ -1485,11 +1485,11 @@ protected: // Generic CFaberActionMakeGeneric::specializedApply(phrase, mpOccurence, mpParameters, params, statBF); - // Ensure no HpBuff etc... - params.HpBuff = 0; - params.SapBuff = 0; - params.StaBuff = 0; - params.FocusBuff = 0; + // Ensure no ChaScore1Buff etc... + params.ChaScore1Buff = 0; + params.ChaScore2Buff = 0; + params.ChaScore3Buff = 0; + params.ChaScore4Buff = 0; } }; @@ -1534,11 +1534,11 @@ protected: // Generic CFaberActionMakeGeneric::specializedApply(phrase, mpOccurence, mpParameters, params, statBF); - // Ensure no HpBuff etc... - params.HpBuff = 0; - params.SapBuff = 0; - params.StaBuff = 0; - params.FocusBuff = 0; + // Ensure no ChaScore1Buff etc... + params.ChaScore1Buff = 0; + params.ChaScore2Buff = 0; + params.ChaScore3Buff = 0; + params.ChaScore4Buff = 0; } }; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/faber_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/faber_phrase.cpp index 577544e13..f172a5799 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/faber_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/faber_phrase.cpp @@ -49,7 +49,7 @@ CFaberPhrase::CFaberPhrase() _FaberAction = 0; _SabrinaCost = 0; _SabrinaRelativeCost = 1.0f; - _FocusCost = 0; + _ChaScore4Cost = 0; _FaberTime = 0; _CraftedItemStaticForm = 0; _RootFaberBricks = false; @@ -69,10 +69,10 @@ CFaberPhrase::CFaberPhrase() _MBOSapLoad = 0.0f; // energy buff on item - _MBOHitPoint = 0; - _MBOSap = 0; - _MBOStamina = 0; - _MBOFocus = 0; + _MBOChaScore1 = 0; + _MBOChaScore2 = 0; + _MBOChaScore3 = 0; + _MBOChaScore4 = 0; _IsStatic = true; _PhraseType = BRICK_TYPE::FABER; @@ -121,29 +121,29 @@ bool CFaberPhrase::build( const TDataSetRow & actorRowId, const std::vector< con switch(param->id()) { - case TBrickParam::FOCUS: - INFOLOG("FOCUS: %i",((CSBrickParamCraftFocus *)param)->Focus); - _FocusCost += ((CSBrickParamCraftFocus *)param)->Focus; + case TBrickParam::ChaScore4: + INFOLOG("ChaScore4: %i",((CSBrickParamCraftChaScore4 *)param)->ChaScore4); + _ChaScore4Cost += ((CSBrickParamCraftChaScore4 *)param)->ChaScore4; break; case TBrickParam::CR_RECOMMENDED: INFOLOG("RECOMMENDED: %i",((CSBrickParamCraftRecommended *)param)->Recommended); _Recommended = ((CSBrickParamCraftRecommended *)param)->Recommended; break; - case TBrickParam::CR_HP: - INFOLOG("HP: %i",((CSBrickParamCraftHP *)param)->HitPoint); - _MBOHitPoint += ((CSBrickParamCraftHP *)param)->HitPoint; + case TBrickParam::CR_ChaScore1: + INFOLOG("ChaScore1: %i",((CSBrickParamCraftChaScore1 *)param)->ChaScore1); + _MBOChaScore1 += ((CSBrickParamCraftChaScore1 *)param)->ChaScore1; break; - case TBrickParam::CR_SAP: - INFOLOG("SAP: %i",((CSBrickParamCraftSap *)param)->Sap); - _MBOSap = ((CSBrickParamCraftSap *)param)->Sap; + case TBrickParam::CR_ChaScore2: + INFOLOG("ChaScore2: %i",((CSBrickParamCraftChaScore2 *)param)->ChaScore2); + _MBOChaScore2 = ((CSBrickParamCraftChaScore2 *)param)->ChaScore2; break; - case TBrickParam::CR_STA: - INFOLOG("STA: %i",((CSBrickParamCraftSta *)param)->Stamina); - _MBOStamina += ((CSBrickParamCraftSta *)param)->Stamina; + case TBrickParam::CR_ChaScore3: + INFOLOG("ChaScore3: %i",((CSBrickParamCraftChaScore3 *)param)->ChaScore3); + _MBOChaScore3 += ((CSBrickParamCraftChaScore3 *)param)->ChaScore3; break; - case TBrickParam::CR_FOCUS: - INFOLOG("FOCUS: %i",((CSBrickParamCraftFocus *)param)->Focus); - _MBOFocus += ((CSBrickParamCraftFocus *)param)->Focus; + case TBrickParam::CR_ChaScore4: + INFOLOG("ChaScore4: %i",((CSBrickParamCraftChaScore4 *)param)->ChaScore4); + _MBOChaScore4 += ((CSBrickParamCraftChaScore4 *)param)->ChaScore4; break; case TBrickParam::CR_QUALITY: INFOLOG("QUALITY: %d", ((CSBrickParamCraftQuality *)param)->Quality); @@ -267,16 +267,16 @@ bool CFaberPhrase::validate() } */ - const sint32 focus = c->getScores()._PhysicalScores[ SCORES::focus ].Current; - if ( focus < _FocusCost ) + const sint32 ChaScore4 = c->getScores()._PhysicalScores[ SCORES::cha_score4 ].Current; + if ( ChaScore4 < _ChaScore4Cost ) { - PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "CANT_CRAFT_NOT_ENOUGHT_FOCUS"); + PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "CANT_CRAFT_NOT_ENOUGHT_ChaScore4"); c->unlockFaberRms(); return false; } - const sint32 hp = c->currentHp(); - if (hp <= 0 || c->isDead()) + const sint32 ChaScore1 = c->currentChaScore1(); + if (ChaScore1 <= 0 || c->isDead()) { PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "CANT_CRAFT_WHEN_DEAD"); c->unlockFaberRms(); @@ -559,12 +559,12 @@ void CFaberPhrase::apply() } // spend energies - SCharacteristicsAndScores &focus = c->getScores()._PhysicalScores[SCORES::focus]; - if ( focus.Current != 0) + SCharacteristicsAndScores &ChaScore4 = c->getScores()._PhysicalScores[SCORES::cha_score4]; + if ( ChaScore4.Current != 0) { - focus.Current = focus.Current - _FocusCost; - if (focus.Current < 0) - focus.Current = 0; + ChaScore4.Current = ChaScore4.Current - _ChaScore4Cost; + if (ChaScore4.Current < 0) + ChaScore4.Current = 0; } // apply action of the sentence diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/faber_phrase.h b/code/ryzom/server/src/entities_game_service/phrase_manager/faber_phrase.h index 61c3f1729..0871c883d 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/faber_phrase.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/faber_phrase.h @@ -84,7 +84,7 @@ public: // Craft methodes inline const TDataSetRow & getActor() const { return _ActorRowId;} inline sint32 getSabrinaCost() const { return (sint32)(_SabrinaCost * _SabrinaRelativeCost); } - inline sint32 getFocusCost() const { return _FocusCost; } + inline sint32 getChaScore4Cost() const { return _ChaScore4Cost; } inline const CStaticItem * getCraftedItemStaticForm() const { return _CraftedItemStaticForm; } inline const CStaticBrick * getRootFaberPlan() const { return _RootFaberPlan; } inline const std::vector< const CStaticItem * > & getMps() const { return _Mps; } @@ -105,10 +105,10 @@ public: inline float getMBOSapLoad() const { return _MBOSapLoad; } // energy buff on item - inline sint32 getMBOHitPoint() { return _MBOHitPoint; } - inline sint32 getMBOSap() { return _MBOSap; } - inline sint32 getMBOStamina() { return _MBOStamina; } - inline sint32 getMBOFocus() { return _MBOFocus; } + inline sint32 getMBOChaScore1() { return _MBOChaScore1; } + inline sint32 getMBOChaScore2() { return _MBOChaScore2; } + inline sint32 getMBOChaScore3() { return _MBOChaScore3; } + inline sint32 getMBOChaScore4() { return _MBOChaScore4; } // bonus for magic casting with item inline float getMBOElementalCastingTimeFactor() const { return _MBOElementalCastingTimeFactor; } @@ -135,8 +135,8 @@ private: sint32 _SabrinaCost; /// Relative cost must be added to total cost float _SabrinaRelativeCost; - /// focus cost of the faber action - sint32 _FocusCost; + /// ChaScore4 cost of the faber action + sint32 _ChaScore4Cost; /// faber time in ticks NLMISC::TGameCycle _FaberTime; @@ -162,10 +162,10 @@ private: float _MBOSapLoad; // energy buff on item - sint32 _MBOHitPoint; - sint32 _MBOSap; - sint32 _MBOStamina; - sint32 _MBOFocus; + sint32 _MBOChaScore1; + sint32 _MBOChaScore2; + sint32 _MBOChaScore3; + sint32 _MBOChaScore4; // bonus for magic casting with item float _MBOElementalCastingTimeFactor; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_extraction_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_extraction_phrase.cpp index 6032adcfc..a6aa92e94 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_extraction_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_extraction_phrase.cpp @@ -138,9 +138,9 @@ bool CFgExtractionPhrase::build( const TDataSetRow & actorRowId, const std::vect TBrickParam::IId* param = (*ip); switch ( param->id() ) { - case TBrickParam::FOCUS: - INFOLOG("CR_FOCUS: %i",((CSBrickParamFocus *)param)->Focus); - _FocusCost += ((CSBrickParamFocus *)param)->Focus; + case TBrickParam::ChaScore4: + INFOLOG("CR_ChaScore4: %i",((CSBrickParamChaScore4 *)param)->ChaScore4); + _ChaScore4Cost += ((CSBrickParamChaScore4 *)param)->ChaScore4; break; case TBrickParam::FG_ABS_S: INFOLOG("FG_ABS_S: %g",((CSBrickParamForageAbsorptionS *)param)->Absorption); @@ -242,7 +242,7 @@ bool CFgExtractionPhrase::build( const TDataSetRow & actorRowId, const std::vect if (!player) return false; - _FocusCost = (sint32)(((float)_FocusCost) * (1.0f + player->wearMalus())); + _ChaScore4Cost = (sint32)(((float)_ChaScore4Cost) * (1.0f + player->wearMalus())); // Set the source (if the target is a source) if ( player->getTarget().getType() == RYZOMID::forageSource ) @@ -493,11 +493,11 @@ bool CFgExtractionPhrase::validate() return false; } - // Check focus - const sint32 focus = player->getScores()._PhysicalScores[ SCORES::focus ].Current; - if ( focus < _FocusCost ) + // Check ChaScore4 + const sint32 ChaScore4 = player->getScores()._PhysicalScores[ SCORES::cha_score4 ].Current; + if ( ChaScore4 < _ChaScore4Cost ) { - PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "PHRASE_NOT_ENOUGH_FOCUS"); + PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "PHRASE_NOT_ENOUGH_ChaScore4"); if ( ForageDebug.get() == 0 ) { return false; @@ -505,8 +505,8 @@ bool CFgExtractionPhrase::validate() } // Check death - const sint32 hp = player->getScores()._PhysicalScores[ SCORES::hit_points ].Current; - if (hp <= 0 || player->getMode()==MBEHAV::DEATH) + const sint32 ChaScore1 = player->getScores()._PhysicalScores[ SCORES::cha_score1 ].Current; + if (ChaScore1 <= 0 || player->getMode()==MBEHAV::DEATH) { return false; } @@ -757,12 +757,12 @@ void CFgExtractionPhrase::apply() return; // Spend energies - SCharacteristicsAndScores &focus = player->getScores()._PhysicalScores[SCORES::focus]; - if ( focus.Current != 0) + SCharacteristicsAndScores &ChaScore4 = player->getScores()._PhysicalScores[SCORES::cha_score4]; + if ( ChaScore4.Current != 0) { - focus.Current = focus.Current - _FocusCost; - if (focus.Current < 0) - focus.Current = 0; + ChaScore4.Current = ChaScore4.Current - _ChaScore4Cost; + if (ChaScore4.Current < 0) + ChaScore4.Current = 0; } // If not forced failure, roll success factor @@ -827,7 +827,7 @@ void CFgExtractionPhrase::applyExtraction( CCharacter *player, float successFact if ( player->forageProgress()->amount() > previousAmount ) { MBEHAV::CBehaviour behav( MBEHAV::EXTRACTING ); // in case stop() was called (ex: cancelStaticActionInProgress(), reset the extracting behaviour) - behav.DeltaHP = (sint16)(player->forageProgress()->amount() | + behav.DeltaChaScore1 = (sint16)(player->forageProgress()->amount() | (player->forageProgress()->quality() << 8)); behav.ForageExtraction.Level = calcLevelFromSkillValue( _SkillValue ); PHRASE_UTILITIES::sendUpdateBehaviour( _ActorRowId, behav ); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp index b45a6043d..4f4299ef1 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp @@ -233,9 +233,9 @@ bool CFgSearchPhrase::build( const TDataSetRow & actorRowId, const std::vector< TBrickParam::IId* param = (*ip); switch ( param->id() ) { - case TBrickParam::FOCUS: - INFOLOG("FOCUS: %i",((CSBrickParamFocus *)param)->Focus); - _FocusCost += ((CSBrickParamFocus *)param)->Focus; + case TBrickParam::ChaScore4: + INFOLOG("ChaScore4: %i",((CSBrickParamChaScore4 *)param)->ChaScore4); + _ChaScore4Cost += ((CSBrickParamChaScore4 *)param)->ChaScore4; break; case TBrickParam::FG_RANGE: INFOLOG("RANGE: %g",((CSBrickParamForageRange *)param)->Range); @@ -316,13 +316,13 @@ bool CFgSearchPhrase::build( const TDataSetRow & actorRowId, const std::vector< //insertProgressingSkill( brick.Skill, brick.SheetId ); } - // Calculate actual focus cost + // Calculate actual ChaScore4 cost CCharacter *player = (CCharacter*)CEntityBaseManager::getEntityBasePtr( _ActorRowId ); if ( ! player ) { return false; } - _FocusCost = (sint32)(((float)_FocusCost) * (1.0f + player->wearMalus())); + _ChaScore4Cost = (sint32)(((float)_ChaScore4Cost) * (1.0f + player->wearMalus())); //egs_feinfo( "Forage phrase built" ); if ( ForageDebug.get() == 10 ) @@ -407,13 +407,13 @@ bool CFgSearchPhrase::validate() return false; } - // Check focus - if ( ! (_IsLocateDepositProspection && player->getProspectionLocateDepositEffect()) ) // a deposit tracking cancellation does not take focus + // Check ChaScore4 + if ( ! (_IsLocateDepositProspection && player->getProspectionLocateDepositEffect()) ) // a deposit tracking cancellation does not take ChaScore4 { - const sint32 focus = player->getScores()._PhysicalScores[ SCORES::focus ].Current; - if ( focus < _FocusCost) + const sint32 ChaScore4 = player->getScores()._PhysicalScores[ SCORES::cha_score4 ].Current; + if ( ChaScore4 < _ChaScore4Cost) { - PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "PHRASE_NOT_ENOUGH_FOCUS"); + PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "PHRASE_NOT_ENOUGH_ChaScore4"); if ( ForageDebug.get() == 0 ) return false; } @@ -595,13 +595,13 @@ class CSEffectLocateDeposit : public CSEffect { public: inline CSEffectLocateDeposit( const TDataSetRow & creatorRowId, - sint32 focusCost, // transmitted into effectValue + sint32 ChaScore4Cost, // transmitted into effectValue uint8 power, const NLMISC::CVector2f& locatedPoint ) - : CSEffect ( creatorRowId, creatorRowId, EFFECT_FAMILIES::ForageLocateDeposit, false, focusCost, power ), + : CSEffect ( creatorRowId, creatorRowId, EFFECT_FAMILIES::ForageLocateDeposit, false, ChaScore4Cost, power ), _LocatedPoint(locatedPoint) { - //_MagicFxType = MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,true); /*TODO*/ + //_MagicFxType = MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,true); /*TODO*/ } /** @@ -640,10 +640,10 @@ bool CSEffectLocateDeposit::update(CTimerEvent * event, bool ) if ( ForageDebug.get() == 0 ) { - // Spend energies, or stop effect if not enough focus - SCharacteristicsAndScores &focus = player->getScores()._PhysicalScores[SCORES::focus]; - if ( focus.Current() >= _Value) - focus.Current = focus.Current - _Value; + // Spend energies, or stop effect if not enough ChaScore4 + SCharacteristicsAndScores &ChaScore4 = player->getScores()._PhysicalScores[SCORES::cha_score4]; + if ( ChaScore4.Current() >= _Value) + ChaScore4.Current = ChaScore4.Current - _Value; else { endProspection(); @@ -699,14 +699,14 @@ void CFgProspectionPhrase::apply() return; // Spend energies - if ( ! (_IsLocateDepositProspection && player->getProspectionLocateDepositEffect()) ) // a deposit tracking cancellation does not spend focus + if ( ! (_IsLocateDepositProspection && player->getProspectionLocateDepositEffect()) ) // a deposit tracking cancellation does not spend ChaScore4 { - SCharacteristicsAndScores &focus = player->getScores()._PhysicalScores[SCORES::focus]; - if ( focus.Current != 0) + SCharacteristicsAndScores &ChaScore4 = player->getScores()._PhysicalScores[SCORES::cha_score4]; + if ( ChaScore4.Current != 0) { - focus.Current = focus.Current - _FocusCost; - if (focus.Current < 0) - focus.Current = 0; + ChaScore4.Current = ChaScore4.Current - _ChaScore4Cost; + if (ChaScore4.Current < 0) + ChaScore4.Current = 0; } } @@ -1026,12 +1026,12 @@ void CFgProspectionPhrase::startLocateDeposit( CCharacter *player ) // Start the effect CVector2f locatedPoint( retainedLoc->NearestPos ); TReportAction report; - sint32 effectFocusCostByUpdate = _FocusCost / ForageFocusRatioOfLocateDeposit.get(); + sint32 effectChaScore4CostByUpdate = _ChaScore4Cost / ForageChaScore4RatioOfLocateDeposit.get(); if ( _EcotypeSpec != ECOSYSTEM::common_ecosystem ) - effectFocusCostByUpdate /= 2; // lower focus consumption with terrain specialization + effectChaScore4CostByUpdate /= 2; // lower ChaScore4 consumption with terrain specialization CSEffectLocateDeposit *effect = new CSEffectLocateDeposit( player->getEntityRowId(), - effectFocusCostByUpdate, 1 /*not used: power*/, locatedPoint ); + effectChaScore4CostByUpdate, 1 /*not used: power*/, locatedPoint ); player->addSabrinaEffect( effect ); // the linked entity player->setProspectionLocateDepositEffect( effect ); } @@ -1884,13 +1884,13 @@ void CDepositMapsBatchTask::run() if ( ! CFile::isExists( pathName ) ) CFile::createDirectory( pathName ); pathName += "/"; - FILE *outputF = nlfopen(pathName + "deposit_maps.html", "w"); + FILE *outputF = fopen( (pathName + "deposit_maps.html").c_str(), "w" ); if ( ! outputF ) { nlwarning( "Can't create file %sdeposit_maps.html", pathName.c_str() ); return; } - FILE *inputF = nlfopen(_InputFilename, "r"); + FILE *inputF = fopen( _InputFilename.c_str(), "r" ); if ( ! inputF ) { fprintf( outputF, "File %s not found", _InputFilename.c_str() ); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/forage_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/forage_phrase.cpp index 2b7ebd755..d4428d578 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/forage_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/forage_phrase.cpp @@ -51,7 +51,7 @@ SKILLS::ESkills EcoTypeToUsedSkill [ECOSYSTEM::NUM_ECOSYSTEM+1] = CForagePhrase::CForagePhrase() : CSPhrase() { // Set initial values - _FocusCost = 0; + _ChaScore4Cost = 0; //_SabrinaImbalance = 0; } diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/forage_phrase.h b/code/ryzom/server/src/entities_game_service/phrase_manager/forage_phrase.h index 6f2cb00b5..59261d65a 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/forage_phrase.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/forage_phrase.h @@ -92,8 +92,8 @@ protected: // because CForagePhrase is a common trunc /// Forage time in ticks (set by build) NLMISC::TGameCycle _ForageTime; - /// Focus cost of the forage action (set by build()) - sint32 _FocusCost; + /// ChaScore4 cost of the forage action (set by build()) + sint32 _ChaScore4Cost; }; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/harvest_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/harvest_phrase.cpp index 476dccff3..4639e5f1d 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/harvest_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/harvest_phrase.cpp @@ -54,8 +54,8 @@ CHarvestPhrase::CHarvestPhrase() _SabrinaRelativeCost = 1.0f; _SabrinaCredit = 0; _SabrinaRelativeCredit = 1.0f; - _StaminaCost = 0; - _HPCost = 0; + _ChaScore2Cost = 0; + _ChaScore1Cost = 0; //_HarvestTime = 25; // 2.5s for DEBUG ONLY _HarvestTime = 0; _IsStatic = true; @@ -122,13 +122,13 @@ bool CHarvestPhrase::build( const TDataSetRow & actorRowId, const std::vector< c switch(brick.Params[i]->id()) { - case TBrickParam::SAP: + case TBrickParam::ChaScore3: return false; - case TBrickParam::HP: - _HPCost += ((CSBrickParamHp *)param)->Hp; + case TBrickParam::ChaScore1: + _ChaScore1Cost += ((CSBrickParamChaScore1 *)param)->ChaScore1; break; - case TBrickParam::STA: - _StaminaCost += ((CSBrickParamSta *)param)->Sta; + case TBrickParam::ChaScore2: + _ChaScore2Cost += ((CSBrickParamChaScore2 *)param)->ChaScore2; break; default: // unused param ? @@ -185,21 +185,21 @@ bool CHarvestPhrase::validate() return false; } - const sint32 hp = player->currentHp(); - if ( hp < _HPCost ) + const sint32 ChaScore1 = player->currentChaScore1(); + if ( ChaScore1 < _ChaScore1Cost ) { ///\todo david : send message _BeingProcessed = false; return false; } - const sint32 sta = player->getScores()._PhysicalScores[ SCORES::stamina ].Current; - if ( sta < _StaminaCost ) + const sint32 ChaScore2 = player->getScores()._PhysicalScores[ SCORES::cha_score2 ].Current; + if ( ChaScore2 < _ChaScore2Cost ) { ///\todo david : send message _BeingProcessed = false; return false; } - if (hp <= 0 || player->isDead()) + if (ChaScore1 <= 0 || player->isDead()) { ///\todo david : send message _BeingProcessed = false; @@ -337,20 +337,20 @@ void CHarvestPhrase::apply() nlwarning(" Invalid entity Id %s", TheDataset.getEntityId(_ActorRowId).toString().c_str() ); return; } - SCharacteristicsAndScores &sta = entity->getScores()._PhysicalScores[SCORES::stamina]; - if ( sta.Current != 0) + SCharacteristicsAndScores &ChaScore2 = entity->getScores()._PhysicalScores[SCORES::cha_score2]; + if ( ChaScore2.Current != 0) { - sta.Current = sta.Current - _StaminaCost; - if (sta.Current < 0) - sta.Current = 0; + ChaScore2.Current = ChaScore2.Current - _ChaScore2Cost; + if (ChaScore2.Current < 0) + ChaScore2.Current = 0; } - SCharacteristicsAndScores &hp = entity->getScores()._PhysicalScores[SCORES::hit_points]; - if ( hp.Current != 0) + SCharacteristicsAndScores &ChaScore1 = entity->getScores()._PhysicalScores[SCORES::cha_score1]; + if ( ChaScore1.Current != 0) { - hp.Current = hp.Current - _HPCost; - if (hp.Current < 0) - hp.Current = 0; + ChaScore1.Current = ChaScore1.Current - _ChaScore1Cost; + if (ChaScore1.Current < 0) + ChaScore1.Current = 0; } }//CHarvestPhrase apply diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/harvest_phrase.h b/code/ryzom/server/src/entities_game_service/phrase_manager/harvest_phrase.h index ac82e4a9b..b5a491bee 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/harvest_phrase.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/harvest_phrase.h @@ -109,10 +109,10 @@ private: sint32 _SabrinaCredit; /// relative credit must be added to total credit float _SabrinaRelativeCredit; - /// stamina cost of the harvest action - sint32 _StaminaCost; - /// hp cost - sint32 _HPCost; + /// ChaScore2 cost of the harvest action + sint32 _ChaScore2Cost; + /// ChaScore1 cost + sint32 _ChaScore1Cost; /// harvest time in ticks NLMISC::TGameCycle _HarvestTime; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_affect_stat.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_affect_stat.cpp index 05067b236..394564eff 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_affect_stat.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_affect_stat.cpp @@ -379,7 +379,7 @@ protected: { c->sendDynamicSystemMessage(c->getId(), "UNEFFICENT_RANGE"); sendAggro = false; - behav.DeltaHP = 0; + behav.DeltaChaScore1 = 0; } else { @@ -390,7 +390,7 @@ protected: _ApplyTargets[i].RowId, _EffectFamily, _CostPerUpdate, - SCORES::sap, + SCORES::cha_score3, _Skill, phrase->getSpellRange(), _Modifier, diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_ai_hot.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_ai_hot.cpp index 22a7925fb..84064bc9e 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_ai_hot.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_ai_hot.cpp @@ -57,13 +57,13 @@ bool CMagicAiActionHoT::initFromAiAction( const CStaticAiAction *aiAction, CMagi switch(_AffectedScore) { - case SCORES::hit_points: + case SCORES::cha_score1: phrase->setMagicFxType( MAGICFX::healtoMagicFx( 5,0,0,true ), 5); break; - case SCORES::sap: + case SCORES::cha_score3: phrase->setMagicFxType( MAGICFX::healtoMagicFx( 0,5,0,true ), 5); break; - case SCORES::stamina: + case SCORES::cha_score2: phrase->setMagicFxType( MAGICFX::healtoMagicFx( 0,0,5,true ), 5); break; }; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_attack.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_attack.cpp index 368f5f143..9adc5233c 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_attack.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_attack.cpp @@ -1,7 +1,7 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // -// This program is free software: you can redistribute it and/or modify +// This program is fee software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. @@ -52,9 +52,9 @@ END_MAGIC_ACTION_FACTORY(CMagicActionBasicDamage) CMagicActionBasicDamage::CMagicActionBasicDamage() -: _DmgHp(0) -, _DmgSap(0) -, _DmgSta(0) +: _DmgChaScore1(0) +, _DmgChaScore3(0) +, _DmgChaScore2(0) , _VampirismValue(0) , _DmgType(DMGTYPE::UNDEFINED) { @@ -75,14 +75,14 @@ bool CMagicActionBasicDamage::initFromAiAction(CStaticAiAction const* aiAction, switch(aiAction->getData().Spell.AffectedScore) { - case SCORES::sap: - _DmgSap = sint32(aiAction->getData().Spell.SpellParamValue + damageBonus); + case SCORES::cha_score3: + _DmgChaScore3 = sint32(aiAction->getData().Spell.SpellParamValue + damageBonus); break; - case SCORES::stamina: - _DmgSta = sint32(aiAction->getData().Spell.SpellParamValue + damageBonus); + case SCORES::cha_score2: + _DmgChaScore2 = sint32(aiAction->getData().Spell.SpellParamValue + damageBonus); break; - case SCORES::hit_points: - _DmgHp = sint32(aiAction->getData().Spell.SpellParamValue + damageBonus); + case SCORES::cha_score1: + _DmgChaScore1 = sint32(aiAction->getData().Spell.SpellParamValue + damageBonus); break; default: return false; @@ -121,10 +121,10 @@ bool CMagicActionBasicDamage::addBrick(CStaticBrick const& brick, CMagicPhrase* break; case TBrickParam::MA_DMG: - INFOLOG("MA_DMG: %u %u %u",((CSBrickParamMagicDmg *)param)->Hp,((CSBrickParamMagicDmg *)param)->Sap,((CSBrickParamMagicDmg *)param)->Sta); - _DmgHp = ((CSBrickParamMagicDmg *)param)->Hp; - _DmgSap = ((CSBrickParamMagicDmg *)param)->Sap; - _DmgSta = ((CSBrickParamMagicDmg *)param)->Sta; + INFOLOG("MA_DMG: %u %u %u",((CSBrickParamMagicDmg *)param)->ChaScore1,((CSBrickParamMagicDmg *)param)->ChaScore3,((CSBrickParamMagicDmg *)param)->ChaScore2); + _DmgChaScore1 = ((CSBrickParamMagicDmg *)param)->ChaScore1; + _DmgChaScore3 = ((CSBrickParamMagicDmg *)param)->ChaScore3; + _DmgChaScore2 = ((CSBrickParamMagicDmg *)param)->ChaScore2; break; default: // unused param, can be useful in the phrase @@ -180,7 +180,7 @@ bool CMagicActionBasicDamage::launchOnEntity( // init target infos targetInfos.RowId = target->getEntityRowId(); targetInfos.MainTarget = mainTarget; - targetInfos.DmgHp = 0; + targetInfos.DmgChaScore1 = 0; targetInfos.ResistFactor = 1.0f; targetInfos.DmgFactor = 1.0f; targetInfos.Immune = false; @@ -280,26 +280,26 @@ bool CMagicActionBasicDamage::launchOnEntity( } } - sint32 maxDmgHp = sint32 ( _DmgHp * dmgFactor ); - sint32 realDmgHp = target->applyDamageOnArmor( _DmgType, maxDmgHp ); + sint32 maxDmgChaScore1 = sint32 ( _DmgChaScore1 * dmgFactor ); + sint32 realDmgChaScore1 = target->applyDamageOnArmor( _DmgType, maxDmgChaScore1 ); - // update behaviour for lost Hp + // update behaviour for lost ChaScore1 CCreature * npc = dynamic_cast(target); CCharacter * c = dynamic_cast(actor); if(npc && c) { if(PHRASE_UTILITIES::testRange(*actor, *target, (uint32)npc->getMaxHitRangeForPC()*1000)) { - behav.DeltaHP -= (sint16)realDmgHp; + behav.DeltaChaScore1 -= (sint16)realDmgChaScore1; } else { - behav.DeltaHP = 0; + behav.DeltaChaScore1 = 0; } } // update target infos - targetInfos.DmgHp = maxDmgHp; + targetInfos.DmgChaScore1 = maxDmgChaScore1; targetInfos.ResistFactor = resistFactor; targetInfos.DmgFactor = dmgFactor; @@ -332,7 +332,7 @@ bool CMagicActionBasicDamage::computeMagicResistance( CTargetInfos& targetInfos, uint32 const casterSkillvalue, DMGTYPE::EDamageType const _DmgType, - sint32 _DmgHp, + sint32 _DmgChaScore1, CEntityBase const* const actor, float rangeFactor, float powerFactor) @@ -421,10 +421,10 @@ bool CMagicActionBasicDamage::computeMagicResistance( } } - sint32 realDmgHp = sint32 ( _DmgHp * dmgFactor ); + sint32 realDmgChaScore1 = sint32 ( _DmgChaScore1 * dmgFactor ); // update target infos - targetInfos.DmgHp = realDmgHp; + targetInfos.DmgChaScore1 = realDmgChaScore1; targetInfos.ResistFactor = resistFactor; targetInfos.DmgFactor = dmgFactor; @@ -448,9 +448,9 @@ bool CMagicActionBasicDamage::applyOnEntity( CTargetInfos& targetInfos, DMGTYPE::EDamageType const _DmgType, - sint32 const _DmgHp, - sint32 const _DmgSap, - sint32 const _DmgSta, + sint32 const _DmgChaScore1, + sint32 const _DmgChaScore3, + sint32 const _DmgChaScore2, sint32 const _VampirismValue) { // If target is immune to magic tell player and return @@ -477,82 +477,82 @@ bool CMagicActionBasicDamage::applyOnEntity( { if(!PHRASE_UTILITIES::testRange(*actor, *target, (uint32)npc->getMaxHitRangeForPC()*1000)) { - const_cast(_DmgHp) = 0; - const_cast(_DmgSap) = 0; - const_cast(_DmgSta) = 0; + const_cast(_DmgChaScore1) = 0; + const_cast(_DmgChaScore3) = 0; + const_cast(_DmgChaScore2) = 0; const_cast(_VampirismValue) = 0; - targetInfos.DmgHp = 0; + targetInfos.DmgChaScore1 = 0; sendAggro = false; c->sendDynamicSystemMessage(c->getId(), "UNEFFICENT_RANGE"); } } - sint32 realDmgHp = targetInfos.DmgHp; - realDmgHp = sint32( target->applyDamageOnArmor( _DmgType, realDmgHp ) ); - if (realDmgHp > target->currentHp()) - realDmgHp = target->currentHp(); + sint32 realDmgChaScore1 = targetInfos.DmgChaScore1; + realDmgChaScore1 = sint32( target->applyDamageOnArmor( _DmgType, realDmgChaScore1 ) ); + if (realDmgChaScore1 > target->currentChaScore1()) + realDmgChaScore1 = target->currentChaScore1(); - targetInfos.ReportAction.Hp += realDmgHp; + targetInfos.ReportAction.ChaScore1 += realDmgChaScore1; // apply vampirism vamp += _VampirismValue; if (vamp && actor->getId().getType() == RYZOMID::player) { - sint32 vampirise = (sint32) (realDmgHp * vampRatio); + sint32 vampirise = (sint32) (realDmgChaScore1 * vampRatio); if (vampirise > vamp) vampirise = vamp; - actor->changeCurrentHp(vampirise); + actor->changeCurrentChaScore1(vampirise); SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias(target->getId(), CAIAliasTranslator::getInstance()->getAIAlias(target->getId())); params[1].Int = vampirise; CCharacter::sendDynamicSystemMessage(actor->getId(),"EGS_ACTOR_VAMPIRISE_EI", params); } - // apply Sap damage - sint32 realDmgSap = 0; + // apply ChaScore3 damage + sint32 realDmgChaScore3 = 0; { - SCharacteristicsAndScores& score = target->getScores()._PhysicalScores[SCORES::sap]; - sint32 maxRealDmgSap = (sint32)( _DmgSap * targetInfos.DmgFactor ); - realDmgSap = target->applyDamageOnArmor(_DmgType, maxRealDmgSap); - if (realDmgSap != 0) + SCharacteristicsAndScores& score = target->getScores()._PhysicalScores[SCORES::cha_score3]; + sint32 maxRealDmgChaScore3 = (sint32)( _DmgChaScore3 * targetInfos.DmgFactor ); + realDmgChaScore3 = target->applyDamageOnArmor(_DmgType, maxRealDmgChaScore3); + if (realDmgChaScore3 != 0) { - PHRASE_UTILITIES::sendScoreModifierSpellMessage(actor->getId(), target->getId(), -realDmgSap, -maxRealDmgSap, SCORES::sap, ACTNATURE::OFFENSIVE_MAGIC); + PHRASE_UTILITIES::sendScoreModifierSpellMessage(actor->getId(), target->getId(), -realDmgChaScore3, -maxRealDmgChaScore3, SCORES::cha_score3, ACTNATURE::OFFENSIVE_MAGIC); - if (realDmgSap > score.Current) - realDmgSap = score.Current; - score.Current = score.Current - realDmgSap; + if (realDmgChaScore3 > score.Current) + realDmgChaScore3 = score.Current; + score.Current = score.Current - realDmgChaScore3; - targetInfos.ReportAction.Sap += realDmgSap; + targetInfos.ReportAction.ChaScore3 += realDmgChaScore3; } } - // apply Stamina damage - sint32 realDmgSta = 0; + // apply ChaScore2 damage + sint32 realDmgChaScore2 = 0; { - SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::stamina]; - sint32 maxRealDmgSta = sint32( _DmgSta * targetInfos.DmgFactor ); - realDmgSta = target->applyDamageOnArmor( _DmgType, maxRealDmgSta ); - if (realDmgSta != 0) + SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score2]; + sint32 maxRealDmgChaScore2 = sint32( _DmgChaScore2 * targetInfos.DmgFactor ); + realDmgChaScore2 = target->applyDamageOnArmor( _DmgType, maxRealDmgChaScore2 ); + if (realDmgChaScore2 != 0) { - PHRASE_UTILITIES::sendScoreModifierSpellMessage(actor->getId(), target->getId(), -realDmgSta, -maxRealDmgSta, SCORES::stamina, ACTNATURE::OFFENSIVE_MAGIC); + PHRASE_UTILITIES::sendScoreModifierSpellMessage(actor->getId(), target->getId(), -realDmgChaScore2, -maxRealDmgChaScore2, SCORES::cha_score2, ACTNATURE::OFFENSIVE_MAGIC); - if (realDmgSta > score.Current) - realDmgSta = score.Current; - score.Current = score.Current - realDmgSta; + if (realDmgChaScore2 > score.Current) + realDmgChaScore2 = score.Current; + score.Current = score.Current - realDmgChaScore2; - targetInfos.ReportAction.Sta += realDmgSta; + targetInfos.ReportAction.ChaScore2 += realDmgChaScore2; } } targetInfos.ReportAction.ActionNature = ACTNATURE::OFFENSIVE_MAGIC; // compute aggro - sint32 max = target->maxHp(); + sint32 max = target->maxChaScore1(); - float aggroHp = 0.0f; - float aggroSap = 0.0f; - float aggroSta = 0.0f; + float aggroChaScore1 = 0.0f; + float aggroChaScore3 = 0.0f; + float aggroChaScore2 = 0.0f; CAiEventReport report; if (phrase) @@ -561,43 +561,43 @@ bool CMagicActionBasicDamage::applyOnEntity( report.Originator = actor->getEntityRowId(); report.Target = target->getEntityRowId(); report.Type = ACTNATURE::OFFENSIVE_MAGIC; - if (max && _DmgHp != 0) + if (max && _DmgChaScore1 != 0) { - aggroHp = min(1.0f, float(realDmgHp)/float(max) ); - report.addDelta(AI_EVENT_REPORT::HitPoints, (-1)*realDmgHp); + aggroChaScore1 = min(1.0f, float(realDmgChaScore1)/float(max) ); + report.addDelta(AI_EVENT_REPORT::ChaScore1, (-1)*realDmgChaScore1); } - max = target->getPhysScores()._PhysicalScores[SCORES::sap].Max; - if (max && _DmgSap != 0) + max = target->getPhysScores()._PhysicalScores[SCORES::cha_score3].Max; + if (max && _DmgChaScore3 != 0) { - aggroSap = min(1.0f, float(realDmgSap)/float(max) ); - report.addDelta(AI_EVENT_REPORT::Sap, (-1)*realDmgSap); + aggroChaScore3 = min(1.0f, float(realDmgChaScore3)/float(max) ); + report.addDelta(AI_EVENT_REPORT::ChaScore3, (-1)*realDmgChaScore3); } - max = target->getPhysScores()._PhysicalScores[SCORES::stamina].Max; - if (max && _DmgSta != 0) + max = target->getPhysScores()._PhysicalScores[SCORES::cha_score2].Max; + if (max && _DmgChaScore2 != 0) { - aggroSta = min(1.0f,float(realDmgSta)/float(max)); - report.addDelta(AI_EVENT_REPORT::Stamina, (-1)*realDmgSta); + aggroChaScore2 = min(1.0f,float(realDmgChaScore2)/float(max)); + report.addDelta(AI_EVENT_REPORT::ChaScore2, (-1)*realDmgChaScore2); } // send report - report.AggroAdd = - min(1.0f, 1.0f - (1.0f-aggroHp)*(1.0f-aggroSap)*(1.0f-aggroSta) ); + report.AggroAdd = - min(1.0f, 1.0f - (1.0f-aggroChaScore1)*(1.0f-aggroChaScore3)*(1.0f-aggroChaScore2) ); if(sendAggro) CPhraseManager::getInstance().addAiEventReport(report); - // apply Hp damage - if (realDmgHp > 0) + // apply ChaScore1 damage + if (realDmgChaScore1 > 0) { - if ( target->changeCurrentHp( -realDmgHp, actor->getEntityRowId()) ) + if ( target->changeCurrentChaScore1( -realDmgChaScore1, actor->getEntityRowId()) ) { - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), -realDmgHp, -targetInfos.DmgHp ,SCORES::hit_points , ACTNATURE::OFFENSIVE_MAGIC); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), -realDmgChaScore1, -targetInfos.DmgChaScore1 ,SCORES::cha_score1 , ACTNATURE::OFFENSIVE_MAGIC); PHRASE_UTILITIES::sendDeathMessages( actor->getEntityRowId(), target->getEntityRowId() ); } else { - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), -realDmgHp, -targetInfos.DmgHp ,SCORES::hit_points , ACTNATURE::OFFENSIVE_MAGIC); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), -realDmgChaScore1, -targetInfos.DmgChaScore1 ,SCORES::cha_score1 , ACTNATURE::OFFENSIVE_MAGIC); } } @@ -734,7 +734,7 @@ void CMagicActionBasicDamage::launch( targetInfos.ReportAction.Skill = _Skill; launchOnEntity(phrase, actor, bounceTarget,false, skillValue, skillBaseValue, behav, isMad, 1.0f, targetInfos); - if ( _DmgSap || _DmgSta || targetInfos.needsApply() ) + if ( _DmgChaScore3 || _DmgChaScore2 || targetInfos.needsApply() ) { _ApplyTargets.push_back(targetInfos); } @@ -796,7 +796,7 @@ void CMagicActionBasicDamage::launch( resists.clear(i); } - if ( _DmgSap || _DmgSta || targetInfos.needsApply() ) + if ( _DmgChaScore3 || _DmgChaScore2 || targetInfos.needsApply() ) { // insert the main target at the first position because there may already be a bounce target if (i == 0) @@ -852,7 +852,7 @@ void CMagicActionBasicDamage::apply( bool reportXpForEntity = true; // true if target has resisted or is immune - if (applyOnEntity(phrase, actor, target, vamp, vampRatio, _ApplyTargets[i], _DmgType, _DmgHp, _DmgSap, _DmgSta, _VampirismValue)) + if (applyOnEntity(phrase, actor, target, vamp, vampRatio, _ApplyTargets[i], _DmgType, _DmgChaScore1, _DmgChaScore3, _DmgChaScore2, _VampirismValue)) reportXpForEntity = false; if (reportXpForEntity) @@ -869,7 +869,7 @@ void CMagicActionBasicDamage::apply( } // only send report if damage have been made - if (actionReports[i].Hp != 0 || actionReports[i].Sap != 0 || actionReports[i].Sta != 0 || actionReports[i].Focus != 0) + if (actionReports[i].ChaScore1 != 0 || actionReports[i].ChaScore3 != 0 || actionReports[i].ChaScore2 != 0 || actionReports[i].ChaScore4 != 0) { PROGRESSIONPVE::CCharacterProgressionPVE::getInstance()->actionReport(actionReports[i], (i==0)); PROGRESSIONPVP::CCharacterProgressionPVP::getInstance()->reportAction(actionReports[i]); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_attack.h b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_attack.h index 4352b3979..7d51f6ea6 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_attack.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_attack.h @@ -37,13 +37,13 @@ public: /// returns true if the target needs to be treated by apply() bool needsApply() const { - return (DmgHp > 0 || Immune || ResistFactor<=0.f); + return (DmgChaScore1 > 0 || Immune || ResistFactor<=0.f); } public: TDataSetRow RowId; bool MainTarget; - sint32 DmgHp; + sint32 DmgChaScore1; float ResistFactor; float DmgFactor; bool Immune; @@ -114,9 +114,9 @@ public: CTargetInfos& targetInfos, DMGTYPE::EDamageType const _DmgType, - sint32 const _DmgHp, - sint32 const _DmgSap, - sint32 const _DmgSta, + sint32 const _DmgChaScore1, + sint32 const _DmgChaScore3, + sint32 const _DmgChaScore2, sint32 const _VampirismValue); static bool computeMagicResistance( @@ -124,16 +124,16 @@ public: CTargetInfos& targetInfos, //< modified uint32 const casterSkillvalue, DMGTYPE::EDamageType const _DmgType, - sint32 _DmgHp, + sint32 _DmgChaScore1, CEntityBase const* const actor, float rangeFactor, float powerFactor); private: DMGTYPE::EDamageType _DmgType; - sint32 _DmgHp; - sint32 _DmgSap; - sint32 _DmgSta; + sint32 _DmgChaScore1; + sint32 _DmgChaScore3; + sint32 _DmgChaScore2; sint32 _VampirismValue; /// targets that need to be treated by apply() diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_debuff.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_debuff.cpp index 05987a4f6..a29774649 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_debuff.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_debuff.cpp @@ -84,7 +84,7 @@ protected: } virtual void apply( CMagicPhrase * phrase, float successFactor,MBEHAV::CBehaviour & behav ) { - NL_ALLOC_CONTEXT(MADSAPY); + NL_ALLOC_CONTEXT(MADChaScore3Y); ///\todo nico: // - location // - armor + shield @@ -108,12 +108,12 @@ protected: return; // SCORES::EScores linkEnergy; -// if ( phrase->getSapCost() > 0 ) +// if ( phrase->getChaScore3Cost() > 0 ) // { -// linkEnergy = SCORES::sap; +// linkEnergy = SCORES::cha_score3; // } // else -// linkEnergy = SCORES::hit_points;; +// linkEnergy = SCORES::cha_score1;; for ( uint i = 0; i < targets.size(); i++ ) { // check target @@ -128,7 +128,7 @@ protected: targets[i].getId(), _UpdatePeriod, _CostPerUpdate, - SCORES::sap, + SCORES::cha_score3, _Skill, _TargetSkill, _DebuffValue ); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_dot.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_dot.cpp index 8b9649730..f93e09c0f 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_dot.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_dot.cpp @@ -40,7 +40,7 @@ class CMagicActionDot : public IMagicAction { public: CMagicActionDot() - :_DmgHp(0),_DmgSap(0),_DmgSta(0),_DmgType(DMGTYPE::UNDEFINED),_CostPerUpdate(0),_Power(0),_Vampirise(0),_VampiriseRatio(1) {} + :_DmgChaScore1(0),_DmgChaScore3(0),_DmgChaScore2(0),_DmgType(DMGTYPE::UNDEFINED),_CostPerUpdate(0),_Power(0),_Vampirise(0),_VampiriseRatio(1) {} /// build from an ai action @@ -54,14 +54,14 @@ public: switch(aiAction->getData().LinkSpell.AffectedScore) { - case SCORES::sap: - _DmgSap = sint32(aiAction->getData().LinkSpell.SpellParamValue); + case SCORES::cha_score3: + _DmgChaScore3 = sint32(aiAction->getData().LinkSpell.SpellParamValue); break; - case SCORES::stamina: - _DmgSta = sint32(aiAction->getData().LinkSpell.SpellParamValue); + case SCORES::cha_score2: + _DmgChaScore2 = sint32(aiAction->getData().LinkSpell.SpellParamValue); break; - case SCORES::hit_points: - _DmgHp = sint32(aiAction->getData().LinkSpell.SpellParamValue); + case SCORES::cha_score1: + _DmgChaScore1 = sint32(aiAction->getData().LinkSpell.SpellParamValue); break; default: return false; @@ -69,7 +69,7 @@ public: _DmgType = aiAction->getData().LinkSpell.DamageType; - _CostPerUpdate = max(aiAction->getData().LinkSpell.SapCostRate, aiAction->getData().LinkSpell.HpCostRate); + _CostPerUpdate = max(aiAction->getData().LinkSpell.ChaScore3CostRate, aiAction->getData().LinkSpell.ChaScore1CostRate); _Power = (uint8) fabs(aiAction->getData().LinkSpell.SpellParamValue); phrase->setMagicFxType( MAGICFX::toMagicFx( _DmgType ,true), 1 ); @@ -116,10 +116,10 @@ protected: break; case TBrickParam::MA_DMG: - INFOLOG("MA_DMG: %u %u %u",((CSBrickParamMagicDmg *)param)->Hp,((CSBrickParamMagicDmg *)param)->Sap,((CSBrickParamMagicDmg *)param)->Sta); - _DmgHp = ((CSBrickParamMagicDmg *)param)->Hp; - _DmgSap = ((CSBrickParamMagicDmg *)param)->Sap; - _DmgSta = ((CSBrickParamMagicDmg *)param)->Sta; + INFOLOG("MA_DMG: %u %u %u",((CSBrickParamMagicDmg *)param)->ChaScore1,((CSBrickParamMagicDmg *)param)->ChaScore3,((CSBrickParamMagicDmg *)param)->ChaScore2); + _DmgChaScore1 = ((CSBrickParamMagicDmg *)param)->ChaScore1; + _DmgChaScore3 = ((CSBrickParamMagicDmg *)param)->ChaScore3; + _DmgChaScore2 = ((CSBrickParamMagicDmg *)param)->ChaScore2; break; case TBrickParam::MA_LINK_COST: @@ -395,7 +395,7 @@ protected: { c->sendDynamicSystemMessage(c->getId(), "UNEFFICENT_RANGE"); sendAggro = false; - behav.DeltaHP = 0; + behav.DeltaChaScore1 = 0; } else { @@ -406,15 +406,15 @@ protected: phrase->getActor(), _ApplyTargets[i].RowId, _CostPerUpdate, - SCORES::sap, + SCORES::cha_score3, _Skill, phrase->getSpellRange(), _DmgType, _Power, reportAction, - sint32(_DmgHp * factor), - sint32(_DmgSap * factor), - sint32(_DmgSta * factor), + sint32(_DmgChaScore1 * factor), + sint32(_DmgChaScore3 * factor), + sint32(_DmgChaScore2 * factor), _Vampirise, _VampiriseRatio); @@ -467,9 +467,9 @@ protected: } DMGTYPE::EDamageType _DmgType; - sint32 _DmgHp; - sint32 _DmgSap; - sint32 _DmgSta; + sint32 _DmgChaScore1; + sint32 _DmgChaScore3; + sint32 _DmgChaScore2; sint32 _CostPerUpdate; uint8 _Power; sint32 _Vampirise; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_heal.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_heal.cpp index 04711661d..ae92721e7 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_heal.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_heal.cpp @@ -43,7 +43,7 @@ class CMagicActionBasicHeal : public IMagicAction { public: CMagicActionBasicHeal() - :_HealHp(0),_HealSap(0),_HealSta(0){} + :_HealChaScore1(0),_HealChaScore3(0),_HealChaScore2(0){} /// build from AI Action bool initFromAiAction( const CStaticAiAction *aiAction, CMagicPhrase *phrase ) @@ -61,20 +61,20 @@ public: switch(aiAction->getData().Spell.AffectedScore) { - case SCORES::sap: - _HealSap = sint32(aiAction->getData().Spell.SpellParamValue + healBonus); + case SCORES::cha_score3: + _HealChaScore3 = sint32(aiAction->getData().Spell.SpellParamValue + healBonus); break; - case SCORES::stamina: - _HealSta = sint32(aiAction->getData().Spell.SpellParamValue + healBonus); + case SCORES::cha_score2: + _HealChaScore2 = sint32(aiAction->getData().Spell.SpellParamValue + healBonus); break; - case SCORES::hit_points: - _HealHp = sint32(aiAction->getData().Spell.SpellParamValue + healBonus); + case SCORES::cha_score1: + _HealChaScore1 = sint32(aiAction->getData().Spell.SpellParamValue + healBonus); break; default: return false; }; - phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,false ), 3); + phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,false ), 3); return true; } @@ -84,9 +84,9 @@ protected: { TDataSetRow RowId; bool MainTarget; - sint32 HealHp; - sint32 HealSap; - sint32 HealSta; + sint32 HealChaScore1; + sint32 HealChaScore3; + sint32 HealChaScore2; }; protected: @@ -104,11 +104,11 @@ protected: effectEnd = true; return true; case TBrickParam::MA_HEAL: - INFOLOG("MA_HEAL: %u %u %u",((CSBrickParamMagicHeal *)param)->Hp,((CSBrickParamMagicHeal *)param)->Sap,((CSBrickParamMagicHeal *)param)->Sta); - _HealHp = ((CSBrickParamMagicHeal *)param)->Hp; - _HealSap = ((CSBrickParamMagicHeal *)param)->Sap; - _HealSta = ((CSBrickParamMagicHeal *)param)->Sta; - phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,false ), brick.SabrinaValue); + INFOLOG("MA_HEAL: %u %u %u",((CSBrickParamMagicHeal *)param)->ChaScore1,((CSBrickParamMagicHeal *)param)->ChaScore3,((CSBrickParamMagicHeal *)param)->ChaScore2); + _HealChaScore1 = ((CSBrickParamMagicHeal *)param)->ChaScore1; + _HealChaScore3 = ((CSBrickParamMagicHeal *)param)->ChaScore3; + _HealChaScore2 = ((CSBrickParamMagicHeal *)param)->ChaScore2; + phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,false ), brick.SabrinaValue); default: // unused param, can be useful in the phrase @@ -180,25 +180,25 @@ protected: CTargetInfos targetInfos; targetInfos.RowId = target->getEntityRowId(); targetInfos.MainTarget = (i == 0); - targetInfos.HealHp = 0; - targetInfos.HealSap = 0; - targetInfos.HealSta = 0; + targetInfos.HealChaScore1 = 0; + targetInfos.HealChaScore3 = 0; + targetInfos.HealChaScore2 = 0; float factor = successFactor * powerFactors[i] * phrase->getAreaSpellPowerFactor(); - if ( _HealHp != 0) + if ( _HealChaScore1 != 0) { - targetInfos.HealHp = sint32(_HealHp * factor); + targetInfos.HealChaScore1 = sint32(_HealChaScore1 * factor); - // update behaviour for healed Hp - behav.DeltaHP += sint16(targetInfos.HealHp); + // update behaviour for healed ChaScore1 + behav.DeltaChaScore1 += sint16(targetInfos.HealChaScore1); } - if (_HealSap != 0) + if (_HealChaScore3 != 0) { - targetInfos.HealSap = sint32(_HealSap * factor); + targetInfos.HealChaScore3 = sint32(_HealChaScore3 * factor); } - if ( _HealSta != 0 ) + if ( _HealChaScore2 != 0 ) { - targetInfos.HealSta = sint32(_HealSta * factor); + targetInfos.HealChaScore2 = sint32(_HealChaScore2 * factor); } _ApplyTargets.push_back(targetInfos); @@ -254,123 +254,123 @@ protected: aiReport.Target = _ApplyTargets[i].RowId; aiReport.Type = ACTNATURE::CURATIVE_MAGIC; - if ( _HealHp != 0) + if ( _HealChaScore1 != 0) { - sint32 & realHealHp = _ApplyTargets[i].HealHp; - // clip heal hp - if (realHealHp + target->currentHp() > target->maxHp()) + sint32 & realHealChaScore1 = _ApplyTargets[i].HealChaScore1; + // clip heal ChaScore1 + if (realHealChaScore1 + target->currentChaScore1() > target->maxChaScore1()) { - realHealHp = target->maxHp() - target->currentHp(); + realHealChaScore1 = target->maxChaScore1() - target->currentChaScore1(); } - target->changeCurrentHp(realHealHp); - if ( target->currentHp() >= target->maxHp() ) + target->changeCurrentChaScore1(realHealChaScore1); + if ( target->currentChaScore1() >= target->maxChaScore1() ) { - if ( realHealHp > 0) - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealHp, realHealHp, SCORES::hit_points , ACTNATURE::CURATIVE_MAGIC); - reportAction.Hp = realHealHp; + if ( realHealChaScore1 > 0) + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealChaScore1, realHealChaScore1, SCORES::cha_score1 , ACTNATURE::CURATIVE_MAGIC); + reportAction.ChaScore1 = realHealChaScore1; if (actor != target) { SM_STATIC_PARAMS_2(params2, STRING_MANAGER::entity, STRING_MANAGER::score); params2[0].setEIdAIAlias( target->getId(), CAIAliasTranslator::getInstance()->getAIAlias( target->getId()) ); - params2[1].Enum = SCORES::hit_points; + params2[1].Enum = SCORES::cha_score1; PHRASE_UTILITIES::sendDynamicSystemMessage(actor->getEntityRowId(), "MAGIC_HEAL_FULL_SCORE_ACTOR", params2); } SM_STATIC_PARAMS_1(params, STRING_MANAGER::score); - params[0].Enum = SCORES::hit_points; + params[0].Enum = SCORES::cha_score1; PHRASE_UTILITIES::sendDynamicSystemMessage(target->getEntityRowId(), "MAGIC_HEAL_FULL_SCORE_TARGET", params); } else { - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealHp, realHealHp, SCORES::hit_points , ACTNATURE::CURATIVE_MAGIC); - reportAction.Hp = realHealHp; + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealChaScore1, realHealChaScore1, SCORES::cha_score1 , ACTNATURE::CURATIVE_MAGIC); + reportAction.ChaScore1 = realHealChaScore1; } // update the report - if (target->maxHp()) + if (target->maxChaScore1()) { - float aggro = float(realHealHp)/float(target->maxHp()); + float aggro = float(realHealChaScore1)/float(target->maxChaScore1()); aiReport.AggroAdd = aggro; - aiReport.addDelta(AI_EVENT_REPORT::HitPoints, realHealHp); + aiReport.addDelta(AI_EVENT_REPORT::ChaScore1, realHealChaScore1); CPhraseManager::getInstance().addAiEventReport(aiReport); } } - if (_HealSap != 0) + if (_HealChaScore3 != 0) { - sint32 & realHealSap = _ApplyTargets[i].HealSap; - SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::sap]; - score.Current = score.Current + realHealSap; + sint32 & realHealChaScore3 = _ApplyTargets[i].HealChaScore3; + SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score3]; + score.Current = score.Current + realHealChaScore3; if ( score.Current >= score.Max ) { - realHealSap += score.Max - score.Current; - if ( realHealSap > 0) - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealSap, realHealSap, SCORES::sap , ACTNATURE::CURATIVE_MAGIC); + realHealChaScore3 += score.Max - score.Current; + if ( realHealChaScore3 > 0) + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealChaScore3, realHealChaScore3, SCORES::cha_score3 , ACTNATURE::CURATIVE_MAGIC); score.Current = score.Max; - reportAction.Sap = realHealSap; + reportAction.ChaScore3 = realHealChaScore3; if ( actor != target) { SM_STATIC_PARAMS_2(params2, STRING_MANAGER::entity, STRING_MANAGER::score); params2[0].setEIdAIAlias( target->getId(), CAIAliasTranslator::getInstance()->getAIAlias( target->getId()) ); - params2[1].Enum = SCORES::sap; + params2[1].Enum = SCORES::cha_score3; PHRASE_UTILITIES::sendDynamicSystemMessage(actor->getEntityRowId(), "MAGIC_HEAL_FULL_SCORE_ACTOR", params2); } SM_STATIC_PARAMS_1(params, STRING_MANAGER::score); - params[0].Enum = SCORES::sap; + params[0].Enum = SCORES::cha_score3; PHRASE_UTILITIES::sendDynamicSystemMessage(target->getEntityRowId(), "MAGIC_HEAL_FULL_SCORE_TARGET", params); } else { - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealSap, realHealSap, SCORES::sap , ACTNATURE::CURATIVE_MAGIC); - reportAction.Sap = realHealSap; + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealChaScore3, realHealChaScore3, SCORES::cha_score3 , ACTNATURE::CURATIVE_MAGIC); + reportAction.ChaScore3 = realHealChaScore3; } // update the report - float aggro = float(realHealSap)/float(score.Max); + float aggro = float(realHealChaScore3)/float(score.Max); aiReport.AggroAdd = aggro; - aiReport.addDelta(AI_EVENT_REPORT::Sap, realHealSap); + aiReport.addDelta(AI_EVENT_REPORT::ChaScore3, realHealChaScore3); CPhraseManager::getInstance().addAiEventReport(aiReport); } - if ( _HealSta != 0 ) + if ( _HealChaScore2 != 0 ) { - sint32 & realHealSta = _ApplyTargets[i].HealSta; - SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::stamina]; - score.Current = score.Current + realHealSta; + sint32 & realHealChaScore2 = _ApplyTargets[i].HealChaScore2; + SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score2]; + score.Current = score.Current + realHealChaScore2; if ( score.Current >= score.Max ) { - realHealSta += score.Max - score.Current; - if ( realHealSta > 0) - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealSta, realHealSta, SCORES::stamina , ACTNATURE::CURATIVE_MAGIC); + realHealChaScore2 += score.Max - score.Current; + if ( realHealChaScore2 > 0) + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealChaScore2, realHealChaScore2, SCORES::cha_score2 , ACTNATURE::CURATIVE_MAGIC); score.Current = score.Max; - reportAction.Sta = realHealSta; + reportAction.ChaScore2 = realHealChaScore2; if (actor != target) { SM_STATIC_PARAMS_2(params2, STRING_MANAGER::entity, STRING_MANAGER::score); params2[0].setEIdAIAlias( target->getId(), CAIAliasTranslator::getInstance()->getAIAlias( target->getId() ) ); - params2[1].Enum = SCORES::stamina; + params2[1].Enum = SCORES::cha_score2; PHRASE_UTILITIES::sendDynamicSystemMessage(actor->getEntityRowId(), "MAGIC_HEAL_FULL_SCORE_ACTOR", params2); } SM_STATIC_PARAMS_1(params, STRING_MANAGER::score); - params[0].Enum = SCORES::stamina; + params[0].Enum = SCORES::cha_score2; PHRASE_UTILITIES::sendDynamicSystemMessage(target->getEntityRowId(), "MAGIC_HEAL_FULL_SCORE_TARGET", params); } else { - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealSta, realHealSta, SCORES::stamina , ACTNATURE::CURATIVE_MAGIC); - reportAction.Sta = realHealSta; + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor->getId(), target->getId(), realHealChaScore2, realHealChaScore2, SCORES::cha_score2 , ACTNATURE::CURATIVE_MAGIC); + reportAction.ChaScore2 = realHealChaScore2; } // update the report - float aggro = float(realHealSta)/float(score.Max); + float aggro = float(realHealChaScore2)/float(score.Max); aiReport.AggroAdd = aggro; - aiReport.addDelta(AI_EVENT_REPORT::Stamina, realHealSta); + aiReport.addDelta(AI_EVENT_REPORT::ChaScore2, realHealChaScore2); CPhraseManager::getInstance().addAiEventReport(aiReport); } @@ -385,7 +385,7 @@ protected: for (uint i = 0 ; i < actionReports.size() ; ++i) { // only send report if healing succesful - if (actionReports[i].Hp != 0 || actionReports[i].Sap != 0 || actionReports[i].Sta != 0 || actionReports[i].Focus != 0) + if (actionReports[i].ChaScore1 != 0 || actionReports[i].ChaScore3 != 0 || actionReports[i].ChaScore2 != 0 || actionReports[i].ChaScore4 != 0) { PROGRESSIONPVE::CCharacterProgressionPVE::getInstance()->actionReport(actionReports[i], (i==0)); PROGRESSIONPVP::CCharacterProgressionPVP::getInstance()->reportAction(actionReports[i]); @@ -394,9 +394,9 @@ protected: } } - sint32 _HealHp; - sint32 _HealSap; - sint32 _HealSta; + sint32 _HealChaScore1; + sint32 _HealChaScore3; + sint32 _HealChaScore2; /// targets that need to be treated by apply() std::vector _ApplyTargets; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_hot.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_hot.cpp index 6579e847d..c0e9b4042 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_hot.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_hot.cpp @@ -36,7 +36,7 @@ class CMagicActionHot : public IMagicAction { public: CMagicActionHot() - :_HealHp(0),_HealSap(0),_HealSta(0),_CostPerUpdate(0),_Power(0){} + :_HealChaScore1(0),_HealChaScore3(0),_HealChaScore2(0),_CostPerUpdate(0),_Power(0){} /// build from an ai action virtual bool initFromAiAction( const CStaticAiAction *aiAction, CMagicPhrase *phrase ) @@ -49,24 +49,24 @@ public: switch(aiAction->getData().LinkSpell.AffectedScore) { - case SCORES::sap: - _HealSap = sint32(aiAction->getData().LinkSpell.SpellParamValue); + case SCORES::cha_score3: + _HealChaScore3 = sint32(aiAction->getData().LinkSpell.SpellParamValue); break; - case SCORES::stamina: - _HealSta = sint32(aiAction->getData().LinkSpell.SpellParamValue); + case SCORES::cha_score2: + _HealChaScore2 = sint32(aiAction->getData().LinkSpell.SpellParamValue); break; - case SCORES::hit_points: - _HealHp = sint32(aiAction->getData().LinkSpell.SpellParamValue); + case SCORES::cha_score1: + _HealChaScore1 = sint32(aiAction->getData().LinkSpell.SpellParamValue); break; default: return false; }; - _CostPerUpdate = max(aiAction->getData().LinkSpell.SapCostRate, aiAction->getData().LinkSpell.HpCostRate); + _CostPerUpdate = max(aiAction->getData().LinkSpell.ChaScore3CostRate, aiAction->getData().LinkSpell.ChaScore1CostRate); _Power = (uint8)aiAction->getData().LinkSpell.SpellParamValue; // set main phrase effect Id - phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,true ),1 ); + phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,true ),1 ); */ return true; } @@ -98,11 +98,11 @@ protected: return true; case TBrickParam::MA_HEAL: - INFOLOG("MA_HEAL: %u %u %u",((CSBrickParamMagicHeal *)param)->Hp,((CSBrickParamMagicHeal *)param)->Sap,((CSBrickParamMagicHeal *)param)->Sta); - _HealHp = ((CSBrickParamMagicHeal *)param)->Hp; - _HealSap = ((CSBrickParamMagicHeal *)param)->Sap; - _HealSta = ((CSBrickParamMagicHeal *)param)->Sta; - phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,true ), brick.SabrinaValue); + INFOLOG("MA_HEAL: %u %u %u",((CSBrickParamMagicHeal *)param)->ChaScore1,((CSBrickParamMagicHeal *)param)->ChaScore3,((CSBrickParamMagicHeal *)param)->ChaScore2); + _HealChaScore1 = ((CSBrickParamMagicHeal *)param)->ChaScore1; + _HealChaScore3 = ((CSBrickParamMagicHeal *)param)->ChaScore3; + _HealChaScore2 = ((CSBrickParamMagicHeal *)param)->ChaScore2; + phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,true ), brick.SabrinaValue); // set action sheetid _ActionBrickSheetId = brick.SheetId; @@ -138,7 +138,7 @@ protected: } // set main phrase effect Id - phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,true ), 1 ); + phrase->setMagicFxType( MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,true ), 1 ); return true; } @@ -199,7 +199,7 @@ protected: continue; } -// behav.Spell.SpellId = MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,true ); +// behav.Spell.SpellId = MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,true ); CTargetInfos targetInfos; targetInfos.RowId = target->getEntityRowId(); @@ -227,10 +227,10 @@ protected: //behav.Spell.KillingBlow = 0; // SCORES::TScores linkEnergy; -// if ( phrase->getHPCost() > 0 ) -// linkEnergy = SCORES::hit_points; +// if ( phrase->getChaScore1Cost() > 0 ) +// linkEnergy = SCORES::cha_score1; // else -// linkEnergy = SCORES::sap; +// linkEnergy = SCORES::cha_score3; const uint nbTargets = _ApplyTargets.size(); for ( uint i = 0; i < nbTargets; i++ ) @@ -266,14 +266,14 @@ protected: phrase->getActor(), _ApplyTargets[i].RowId, _CostPerUpdate, - SCORES::sap, + SCORES::cha_score3, _Skill, phrase->getSpellRange(), _Power, reportAction, - uint32(_HealHp * factor), - uint32(_HealSap * factor), - uint32(_HealSta * factor )); + uint32(_HealChaScore1 * factor), + uint32(_HealChaScore3 * factor), + uint32(_HealChaScore2 * factor )); if (phrase->breakNewLink()) { @@ -289,9 +289,9 @@ protected: } } - sint32 _HealHp; - sint32 _HealSap; - sint32 _HealSta; + sint32 _HealChaScore1; + sint32 _HealChaScore3; + sint32 _HealChaScore2; uint _CostPerUpdate; uint8 _Power; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_negative_effect.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_negative_effect.cpp index 5dd8e6a10..63b5823bc 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_negative_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_action_negative_effect.cpp @@ -337,7 +337,7 @@ protected: { c->sendDynamicSystemMessage(c->getId(), "UNEFFICENT_RANGE"); sendAggro = false; - behav.DeltaHP = 0; + behav.DeltaChaScore1 = 0; } else { @@ -346,7 +346,7 @@ protected: _ApplyTargets[i].RowId, _EffectFamily, _CostPerUpdate, - SCORES::sap,//linkEnergy, + SCORES::cha_score3,//linkEnergy, _Skill, phrase->getSpellRange(), _EffectValue, diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_phrase.cpp index 16f77bc8b..810966bb1 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_phrase.cpp @@ -153,8 +153,8 @@ bool CMagicPhrase::initPhraseFromAiAction( const TDataSetRow & actorRowId, const case AI_ACTION::DamageSpell: case AI_ACTION::ToxicCloud: { - _SapCost += data.Spell.SapCost; - _HPCost += data.Spell.HpCost; + _ChaScore3Cost += data.Spell.ChaScore3Cost; + _ChaScore1Cost += data.Spell.ChaScore1Cost; actionLatency = data.Spell.CastingTime; _PostCastTime += data.Spell.PostActionTime; @@ -180,8 +180,8 @@ bool CMagicPhrase::initPhraseFromAiAction( const TDataSetRow & actorRowId, const case AI_ACTION::DoTSpell: case AI_ACTION::HoTSpell: { - _SapCost += data.OTSpell.SapCost; - _HPCost += data.OTSpell.HpCost; + _ChaScore3Cost += data.OTSpell.ChaScore3Cost; + _ChaScore1Cost += data.OTSpell.ChaScore1Cost; actionLatency = data.OTSpell.CastingTime; _PostCastTime += data.OTSpell.PostActionTime; @@ -206,8 +206,8 @@ bool CMagicPhrase::initPhraseFromAiAction( const TDataSetRow & actorRowId, const case AI_ACTION::EffectSpell: { - _SapCost += data.EffectSpell.SapCost; - _HPCost += data.EffectSpell.HpCost; + _ChaScore3Cost += data.EffectSpell.ChaScore3Cost; + _ChaScore1Cost += data.EffectSpell.ChaScore1Cost; actionLatency = data.EffectSpell.CastingTime; _PostCastTime += data.EffectSpell.PostActionTime; @@ -231,8 +231,8 @@ bool CMagicPhrase::initPhraseFromAiAction( const TDataSetRow & actorRowId, const break; case AI_ACTION::EoTSpell: { - _SapCost += data.OTEffectSpell.SapCost; - _HPCost += data.OTEffectSpell.HpCost; + _ChaScore3Cost += data.OTEffectSpell.ChaScore3Cost; + _ChaScore1Cost += data.OTEffectSpell.ChaScore1Cost; actionLatency = data.OTEffectSpell.CastingTime; _PostCastTime += data.OTEffectSpell.PostActionTime; @@ -320,13 +320,13 @@ void CMagicPhrase::applyBrickParam( const TBrickParam::IId * param, const CStati } break; - case TBrickParam::HP: - INFOLOG("HP: %i",((CSBrickParamHp *)param)->Hp); - _HPCost += ((CSBrickParamHp *)param)->Hp; + case TBrickParam::ChaScore1: + INFOLOG("ChaScore1: %i",((CSBrickParamChaScore1 *)param)->ChaScore1); + _ChaScore1Cost += ((CSBrickParamChaScore1 *)param)->ChaScore1; break; - case TBrickParam::SAP: - INFOLOG("SAP: %i",((CSBrickParamSap *)param)->Sap); - _SapCost += ((CSBrickParamSap *)param)->Sap; + case TBrickParam::ChaScore3: + INFOLOG("ChaScore3: %i",((CSBrickParamChaScore3 *)param)->ChaScore3); + _ChaScore3Cost += ((CSBrickParamChaScore3 *)param)->ChaScore3; break; case TBrickParam::MA_BREAK_RES: INFOLOG("MA_BREAK_RES: %u",((CSBrickParamMagicBreakResist *)param)->BreakResist); @@ -620,8 +620,8 @@ bool CMagicPhrase::build( const TDataSetRow & actorRowId, const std::vector< con if( c ) { WearMalus += c->wearMalus(); - _SapCost = (uint16)(_SapCost * WearMalus); - _HPCost = (uint16)(_HPCost * WearMalus); + _ChaScore3Cost = (uint16)(_ChaScore3Cost * WearMalus); + _ChaScore1Cost = (uint16)(_ChaScore1Cost * WearMalus); } // Compute the casting time for the phrase. @@ -712,18 +712,18 @@ bool CMagicPhrase::validate() // test caster scores (only for players) CCharacter *character = (CCharacter *) (entity); - const sint32 hp = entity->currentHp(); - if ( hp <= _HPCost ) + const sint32 ChaScore1 = entity->currentChaScore1(); + if ( ChaScore1 <= _ChaScore1Cost ) { if ( entity->getId().getType() == RYZOMID::player ) - PHRASE_UTILITIES::sendDynamicSystemMessage(entity->getEntityRowId(),"EGS_MAGIC_LACK_HP" ); + PHRASE_UTILITIES::sendDynamicSystemMessage(entity->getEntityRowId(),"EGS_MAGIC_LACK_ChaScore1" ); return false; } - const sint32 sap = entity->getScores()._PhysicalScores[ SCORES::sap ].Current; - if ( sap < _SapCost ) + const sint32 ChaScore3 = entity->getScores()._PhysicalScores[ SCORES::cha_score3 ].Current; + if ( ChaScore3 < _ChaScore3Cost ) { if ( entity->getId().getType() == RYZOMID::player ) - PHRASE_UTILITIES::sendDynamicSystemMessage(entity->getEntityRowId(),"EGS_MAGIC_LACK_SAP" ); + PHRASE_UTILITIES::sendDynamicSystemMessage(entity->getEntityRowId(),"EGS_MAGIC_LACK_ChaScore3" ); return false; } @@ -748,7 +748,7 @@ bool CMagicPhrase::validate() return false; } // test target is still alive - if( target->isDead() && (!( ( target->getId().getType() == RYZOMID::player ) && ( target->currentHp() > - target->maxHp() ) ) ) ) + if( target->isDead() && (!( ( target->getId().getType() == RYZOMID::player ) && ( target->currentChaScore1() > - target->maxChaScore1() ) ) ) ) { // target is dead PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "MAGIC_TARGET_DEAD"); @@ -1013,7 +1013,7 @@ void CMagicPhrase::execute() // and properly handling it if you do. bool CMagicPhrase::spendResources(CEntityBase* entity) { - // Entity is not a player? => creature/npc don't have sap/hp/sta for spell! + // Entity is not a player? => creature/npc don't have ChaScore3/ChaScore1/ChaScore2 for spell! if (entity->getId().getType() != RYZOMID::player) return true; @@ -1022,33 +1022,33 @@ bool CMagicPhrase::spendResources(CEntityBase* entity) return true; // Spend Resources. Spend all reseources, or spend none. - nlassert(SCORES::hit_points < entity->getScores()._PhysicalScores.size()); - nlassert(SCORES::sap < entity->getScores()._PhysicalScores.size()); + nlassert(SCORES::cha_score1 < entity->getScores()._PhysicalScores.size()); + nlassert(SCORES::cha_score3 < entity->getScores()._PhysicalScores.size()); - SCharacteristicsAndScores &hp = entity->getScores()._PhysicalScores[SCORES::hit_points]; - SCharacteristicsAndScores &sap = entity->getScores()._PhysicalScores[SCORES::sap]; + SCharacteristicsAndScores &ChaScore1 = entity->getScores()._PhysicalScores[SCORES::cha_score1]; + SCharacteristicsAndScores &ChaScore3 = entity->getScores()._PhysicalScores[SCORES::cha_score3]; // do not allow player to die - if ((sint32)_HPCost >= sint32(hp.Current)) + if ((sint32)_ChaScore1Cost >= sint32(ChaScore1.Current)) return false; - if ((sint32)_SapCost > sint32(sap.Current)) + if ((sint32)_ChaScore3Cost > sint32(ChaScore3.Current)) return false; - if ( _HPCost != 0 ) + if ( _ChaScore1Cost != 0 ) { - // changeCurrentHp returns "true" if the change kills the entity. why yes, this IS stupid in the extreme. + // changeCurrentChaScore1 returns "true" if the change kills the entity. why yes, this IS stupid in the extreme. // because of the line above, this should never be relevant, but wtf. it's only two lines of code. - if ( entity->changeCurrentHp( (_HPCost) * (-1) ) ) + if ( entity->changeCurrentChaScore1( (_ChaScore1Cost) * (-1) ) ) { PHRASE_UTILITIES::sendDeathMessages( entity->getEntityRowId(), entity->getEntityRowId() ); return false; } } - if ( _SapCost != 0 ) + if ( _ChaScore3Cost != 0 ) { - entity->changeScore(SCORES::sap, -_SapCost); + entity->changeScore(SCORES::cha_score3, -_ChaScore3Cost); } return true; @@ -1078,7 +1078,7 @@ bool CMagicPhrase::launch() PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "MAGIC_MAGICIAN_STAFF_LOW_REQ"); } - // spend sap, hp + // spend ChaScore3, ChaScore1 // returns false if the spell would either kill the caster, or any cost is more than the caster has available. if (spendResources(entity) == false) return false; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_phrase.h b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_phrase.h index 86189d76f..1f6c43d34 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/magic_phrase.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/magic_phrase.h @@ -60,9 +60,9 @@ public: , _SabrinaRelativeCost(1.f) , _SabrinaCredit(0) , _SabrinaRelativeCredit(1.f) - , _SapCost(0) + , _ChaScore3Cost(0) , _BrickMaxSabrinaCost(0) - , _HPCost(0) + , _ChaScore1Cost(0) , _RangeIndex(0) , _CastingTime(0) , _BaseCastingTime(0) @@ -111,8 +111,8 @@ public: //@{ inline uint16 getSabrinaCost() const { return (uint16)(_SabrinaCost * _SabrinaRelativeCost); } inline uint getNbActions() const { return (uint)_Actions.size(); } - inline sint32 getSapCost() const { return _SapCost; } - inline sint32 getHPCost() const { return _HPCost; } + inline sint32 getChaScore3Cost() const { return _ChaScore3Cost; } + inline sint32 getChaScore1Cost() const { return _ChaScore1Cost; } inline ACTNATURE::TActionNature getNature() const { return _Nature; } inline const std::vector & getTargets() const { return _Targets; } @@ -246,10 +246,10 @@ private: uint16 _SabrinaCredit; /// total relative credit (sabrina system), must be added to total credit float _SabrinaRelativeCredit; - /// sap cost of the attack - uint16 _SapCost; - /// hp cost - uint16 _HPCost; + /// ChaScore3 cost of the attack + uint16 _ChaScore3Cost; + /// ChaScore1 cost + uint16 _ChaScore1Cost; /// casting time in ticks NLMISC::TGameCycle _CastingTime; /// casting time in ticks without time credits diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/nolink_dot_effect.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/nolink_dot_effect.cpp index db3a46454..a1cf7126e 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/nolink_dot_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/nolink_dot_effect.cpp @@ -74,9 +74,9 @@ bool CNoLinkDOTEffect::update(CTimerEvent * event, bool applyEffect) bool kill = false; switch(_AffectedScore) { - case SCORES::hit_points: + case SCORES::cha_score1: realDamage = targetEntity->applyDamageOnArmor( _DamageType, maxDamage ); - kill = targetEntity->changeCurrentHp( -realDamage, _CreatorRowId); + kill = targetEntity->changeCurrentChaScore1( -realDamage, _CreatorRowId); break; default: realDamage = targetEntity->applyDamageOnArmor( _DamageType, maxDamage ); @@ -85,7 +85,7 @@ bool CNoLinkDOTEffect::update(CTimerEvent * event, bool applyEffect) } if (targetEntity != NULL && _CreatorRowId.isValid() && TheDataset.isDataSetRowStillValid(_CreatorRowId)) - PHRASE_UTILITIES::sendScoreModifierSpellMessage( TheDataset.getEntityId(_CreatorRowId), targetEntity->getId(), -realDamage, -maxDamage, SCORES::hit_points , ACTNATURE::OFFENSIVE_MAGIC); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( TheDataset.getEntityId(_CreatorRowId), targetEntity->getId(), -realDamage, -maxDamage, SCORES::cha_score1 , ACTNATURE::OFFENSIVE_MAGIC); if (kill) { diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/nolink_hot_effect.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/nolink_hot_effect.cpp index cab3875d4..ab97d6a80 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/nolink_hot_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/nolink_hot_effect.cpp @@ -64,8 +64,8 @@ bool CNoLinkHoTEffect::update(CTimerEvent * event, bool applyEffect) switch(_AffectedScore) { - case SCORES::hit_points: - _TargetEntity->changeCurrentHp(heal, _CreatorRowId); + case SCORES::cha_score1: + _TargetEntity->changeCurrentChaScore1(heal, _CreatorRowId); break; default: _TargetEntity->changeScore(_AffectedScore, heal); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_utilities_functions.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_utilities_functions.cpp index 6b1393d4f..1a01019e2 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_utilities_functions.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_utilities_functions.cpp @@ -720,14 +720,14 @@ void sendDeathMessages( const NLMISC::CEntityId &killerId, const NLMISC::CEntity //-------------------------------------------------------------- // sendHitMessages() //-------------------------------------------------------------- -void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, bool self, sint32 amount, sint32 maxDamage, sint32 lostStamina, sint32 lostSap, BODY::TBodyPart bodyPart) +void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, bool self, sint32 amount, sint32 maxDamage, sint32 lostChaScore2, sint32 lostChaScore3, BODY::TBodyPart bodyPart) { if (!self) self = (aggressorId == victimId); amount = abs(amount); - lostStamina = abs(lostStamina); - lostSap = abs(lostSap); + lostChaScore2 = abs(lostChaScore2); + lostChaScore3 = abs(lostChaScore3); if (maxDamage == amount) maxDamage = 0; @@ -756,21 +756,21 @@ void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, b sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_ACTOR_HIT", params); } - // lost stamina - if (lostStamina>0) + // lost ChaScore2 + if (lostChaScore2>0) { SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias( victimId, CAIAliasTranslator::getInstance()->getAIAlias( victimId ) ); - params[1].Int = lostStamina; - sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_LOSE_STA_ACTOR", params); + params[1].Int = lostChaScore2; + sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_LOSE_ChaScore2_ACTOR", params); } - // lost sap - if (lostSap>0) + // lost ChaScore3 + if (lostChaScore3>0) { SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias( victimId, CAIAliasTranslator::getInstance()->getAIAlias( victimId) ); - params[1].Int = lostSap; - sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_LOSE_SAP_ACTOR", params); + params[1].Int = lostChaScore3; + sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_LOSE_ChaScore3_ACTOR", params); } } else @@ -780,17 +780,17 @@ void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, b params[1].Int = maxDamage; sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_ACTOR_HIT_SELF", params); - // lost stamina - if (lostStamina>0) + // lost ChaScore2 + if (lostChaScore2>0) { - params[0].Int = lostStamina; - sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_LOSE_STA_SELF", params); + params[0].Int = lostChaScore2; + sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_LOSE_ChaScore2_SELF", params); } - // lost sap - if (lostSap>0) + // lost ChaScore3 + if (lostChaScore3>0) { - params[0].Int = lostSap; - sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_LOSE_SAP_SELF", params); + params[0].Int = lostChaScore3; + sendDynamicSystemMessage(TheDataset.getDataSetRow(aggressorId), "COMBAT_LOSE_ChaScore3_SELF", params); } } } @@ -815,21 +815,21 @@ void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, b sendDynamicSystemMessage(TheDataset.getDataSetRow(victimId), "COMBAT_DEFENDER_HIT", params); } - // lost stamina - if (lostStamina>0) + // lost ChaScore2 + if (lostChaScore2>0) { SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias( aggressorId, CAIAliasTranslator::getInstance()->getAIAlias( aggressorId ) ); - params[1].Int = lostStamina; - sendDynamicSystemMessage(TheDataset.getDataSetRow(victimId), "COMBAT_LOSE_STA_TARGET", params); + params[1].Int = lostChaScore2; + sendDynamicSystemMessage(TheDataset.getDataSetRow(victimId), "COMBAT_LOSE_ChaScore2_TARGET", params); } - // lost sap - if (lostSap>0) + // lost ChaScore2 + if (lostChaScore2>0) { SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias( aggressorId, CAIAliasTranslator::getInstance()->getAIAlias( aggressorId) ); - params[1].Int = lostSap; - sendDynamicSystemMessage(TheDataset.getDataSetRow(victimId), "COMBAT_LOSE_SAP_TARGET", params); + params[1].Int = lostChaScore2; + sendDynamicSystemMessage(TheDataset.getDataSetRow(victimId), "COMBAT_LOSE_ChaScore2_TARGET", params); } } @@ -863,17 +863,17 @@ void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, b // params[3].Int = maxDamage; // sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_SPECTATOR_HIT", params); // -// // lost stamina -// if (lostStamina>0) +// // lost ChaScore2 +// if (lostChaScore2>0) // { -// params[2].Int = lostStamina; -// sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_LOSE_STA_SPECTATORS", params); +// params[2].Int = lostChaScore2; +// sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_LOSE_ChaScore2_SPECTATORS", params); // } -// // lost sap -// if (lostSap>0) +// // lost ChaScore3 +// if (lostChaScore3>0) // { -// params[2].Int = lostSap; -// sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_LOSE_SAP_SPECTATORS", params); +// params[2].Int = lostChaScore3; +// sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_LOSE_ChaScore3_SPECTATORS", params); // } // } // else @@ -900,17 +900,17 @@ void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, b // params[1].Type = STRING_MANAGER::integer; // params[1].Int = amount; // sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_SPECTATOR_HIT_SELF" + type, params); -// // lost stamina -// if (lostStamina>0) +// // lost ChaScore2 +// if (lostChaScore2>0) // { -// params[1].Int = lostStamina; -// sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_LOSE_STA_SELF_SPECTATORS" + type, params); +// params[1].Int = lostChaScore2; +// sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_LOSE_ChaScore2_SELF_SPECTATORS" + type, params); // } -// // lost sap -// if (lostSap>0) +// // lost ChaScore3 +// if (lostChaScore3>0) // { -// params[1].Int = lostSap; -// sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_LOSE_SAP_SELF_SPECTATORS" + type, params); +// params[1].Int = lostChaScore3; +// sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_LOSE_ChaScore3_SELF_SPECTATORS" + type, params); // } // } } // sendHitMessages // @@ -918,9 +918,9 @@ void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, b /** * an entity is wounded by a damage shield */ -void sendDamageShieldDamageMessages(const NLMISC::CEntityId &woundedEntity, const NLMISC::CEntityId &defender, uint16 damage, uint16 hpDrain) +void sendDamageShieldDamageMessages(const NLMISC::CEntityId &woundedEntity, const NLMISC::CEntityId &defender, uint16 damage, uint16 ChaScore1Drain) { - if (!damage && !hpDrain) + if (!damage && !ChaScore1Drain) return; // TVectorParamCheck params; @@ -929,7 +929,7 @@ void sendDamageShieldDamageMessages(const NLMISC::CEntityId &woundedEntity, cons SM_STATIC_PARAMS_3(params, STRING_MANAGER::entity, STRING_MANAGER::integer, STRING_MANAGER::integer); params[0].setEIdAIAlias( defender, CAIAliasTranslator::getInstance()->getAIAlias( defender) ); params[1].Int = damage; - params[2].Int = hpDrain; + params[2].Int = ChaScore1Drain; sendDynamicSystemMessage(TheDataset.getDataSetRow(woundedEntity), "COMBAT_DMG_SHIELD_ATTACKER", params); } @@ -938,7 +938,7 @@ void sendDamageShieldDamageMessages(const NLMISC::CEntityId &woundedEntity, cons SM_STATIC_PARAMS_3(params, STRING_MANAGER::entity, STRING_MANAGER::integer, STRING_MANAGER::integer); params[0].setEIdAIAlias( woundedEntity, CAIAliasTranslator::getInstance()->getAIAlias( woundedEntity) ); params[1].Int = damage; - params[2].Int = hpDrain; + params[2].Int = ChaScore1Drain; sendDynamicSystemMessage(TheDataset.getDataSetRow(defender), "COMBAT_DMG_SHIELD_DEFENDER", params); } @@ -964,7 +964,7 @@ void sendDamageShieldDamageMessages(const NLMISC::CEntityId &woundedEntity, cons params[0].setEIdAIAlias( woundedEntity, CAIAliasTranslator::getInstance()->getAIAlias( woundedEntity) ); params[1].setEIdAIAlias( defender, CAIAliasTranslator::getInstance()->getAIAlias( defender) ); params[2].Int = damage; - params[3].Int = hpDrain; + params[3].Int = ChaScore1Drain; sendDynamicSystemMessage(TheDataset.getDataSetRow(defender), "COMBAT_DMG_SHIELD_SPECTATORS", params); } // sendDamageShieldDamageMessages // @@ -972,23 +972,23 @@ void sendDamageShieldDamageMessages(const NLMISC::CEntityId &woundedEntity, cons /** * an vampirism proc has been triggered */ -void sendVampirismProcMessages(const NLMISC::CEntityId &actingEntity, const NLMISC::CEntityId &defender, sint32 hpDrain) +void sendVampirismProcMessages(const NLMISC::CEntityId &actingEntity, const NLMISC::CEntityId &defender, sint32 ChaScore1Drain) { - if (!hpDrain) + if (!ChaScore1Drain) return; if (actingEntity.getType() == RYZOMID::player) { SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias(defender, CAIAliasTranslator::getInstance()->getAIAlias(defender)); - params[1].Int = hpDrain; + params[1].Int = ChaScore1Drain; sendDynamicSystemMessage(TheDataset.getDataSetRow(actingEntity), "COMBAT_PROC_VAMPIRISM_ATTACKER", params); } if (defender.getType() == RYZOMID::player) { SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias(actingEntity, CAIAliasTranslator::getInstance()->getAIAlias(actingEntity)); - params[1].Int = hpDrain; + params[1].Int = ChaScore1Drain; sendDynamicSystemMessage(TheDataset.getDataSetRow(defender), "COMBAT_PROC_VAMPIRISM_DEFENDER", params); } // spectators @@ -1017,7 +1017,7 @@ void sendVampirismProcMessages(const NLMISC::CEntityId &actingEntity, const NLMI SM_STATIC_PARAMS_3(params, STRING_MANAGER::entity, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias(actingEntity, CAIAliasTranslator::getInstance()->getAIAlias(actingEntity)); params[1].setEIdAIAlias(defender, CAIAliasTranslator::getInstance()->getAIAlias(defender)); - params[2].Int = hpDrain; + params[2].Int = ChaScore1Drain; sendDynamicGroupSystemMessage(TheDataset.getDataSetRow(speechGroupId), excluded, "COMBAT_PROC_VAMPIRISM_SPECTATORS", params); } } @@ -1712,7 +1712,7 @@ bool validateSpellTarget( const TDataSetRow &actorRowId, const TDataSetRow &targ // test entity isn't dead already (unless it's a player) if (target->isDead()) { - if (target->getId().getType() == RYZOMID::player && mainTarget && target->currentHp() > (-target->maxHp()) ) + if (target->getId().getType() == RYZOMID::player && mainTarget && target->currentChaScore1() > (-target->maxChaScore1()) ) { // possible as a player in a 'coma' can still be healed (only main target) } @@ -1819,29 +1819,29 @@ void sendScoreModifierSpellMessage( const CEntityId &aggressorId, const CEntityI { switch( score ) { - case SCORES::hit_points: + case SCORES::cha_score1: if ( damage > 0) - msgName = self ? "MAGIC_SELF_HEAL_HP" : "MAGIC_HEAL_HP_CASTER"; + msgName = self ? "MAGIC_SELF_HEAL_ChaScore1" : "MAGIC_HEAL_ChaScore1_CASTER"; else - msgName = self ? "MAGIC_SELF_DAMAGE_HP" : "MAGIC_DAMAGE_HP_CASTER"; + msgName = self ? "MAGIC_SELF_DAMAGE_ChaScore1" : "MAGIC_DAMAGE_ChaScore1_CASTER"; break; - case SCORES::stamina: + case SCORES::cha_score2: if (damage > 0) - msgName = self ? "MAGIC_SELF_HEAL_STA" : "MAGIC_HEAL_STA_CASTER"; + msgName = self ? "MAGIC_SELF_HEAL_ChaScore2" : "MAGIC_HEAL_ChaScore2_CASTER"; else - msgName = self ? "MAGIC_SELF_DAMAGE_STA" : "MAGIC_DAMAGE_STA_CASTER"; + msgName = self ? "MAGIC_SELF_DAMAGE_ChaScore2" : "MAGIC_DAMAGE_ChaScore2_CASTER"; break; - case SCORES::sap: + case SCORES::cha_score3: if (damage > 0) - msgName = self ? "MAGIC_SELF_HEAL_SAP" : "MAGIC_HEAL_SAP_CASTER"; + msgName = self ? "MAGIC_SELF_HEAL_ChaScore3" : "MAGIC_HEAL_ChaScore3_CASTER"; else - msgName = self ? "MAGIC_SELF_DAMAGE_SAP" : "MAGIC_DAMAGE_SAP_CASTER"; + msgName = self ? "MAGIC_SELF_DAMAGE_ChaScore3" : "MAGIC_DAMAGE_ChaScore3_CASTER"; break; - case SCORES::focus: + case SCORES::cha_score4: if (damage > 0) - msgName = self ? "MAGIC_SELF_HEAL_FOCUS" : "MAGIC_HEAL_FOCUS_CASTER"; + msgName = self ? "MAGIC_SELF_HEAL_ChaScore4" : "MAGIC_HEAL_ChaScore4_CASTER"; else - msgName = self ? "MAGIC_SELF_DAMAGE_FOCUS" : "MAGIC_DAMAGE_FOCUS_CASTER"; + msgName = self ? "MAGIC_SELF_DAMAGE_ChaScore4" : "MAGIC_DAMAGE_ChaScore4_CASTER"; break; default: return; @@ -1874,29 +1874,29 @@ void sendScoreModifierSpellMessage( const CEntityId &aggressorId, const CEntityI { switch( score ) { - case SCORES::hit_points: + case SCORES::cha_score1: if ( damage > 0) - msgName = "MAGIC_HEAL_HP_TARGET"; + msgName = "MAGIC_HEAL_ChaScore1_TARGET"; else - msgName = "MAGIC_DAMAGE_HP_TARGET"; + msgName = "MAGIC_DAMAGE_ChaScore1_TARGET"; break; - case SCORES::stamina: + case SCORES::cha_score2: if (damage > 0) - msgName = "MAGIC_HEAL_STA_TARGET"; + msgName = "MAGIC_HEAL_ChaScore2_TARGET"; else - msgName = "MAGIC_DAMAGE_STA_TARGET"; + msgName = "MAGIC_DAMAGE_ChaScore2_TARGET"; break; - case SCORES::sap: + case SCORES::cha_score3: if (damage > 0) - msgName = "MAGIC_HEAL_SAP_TARGET"; + msgName = "MAGIC_HEAL_ChaScore3_TARGET"; else - msgName = "MAGIC_DAMAGE_SAP_TARGET"; + msgName = "MAGIC_DAMAGE_ChaScore3_TARGET"; break; - case SCORES::focus: + case SCORES::cha_score4: if (damage > 0) - msgName = "MAGIC_HEAL_FOCUS_TARGET"; + msgName = "MAGIC_HEAL_ChaScore4_TARGET"; else - msgName = "MAGIC_DAMAGE_FOCUS_TARGET"; + msgName = "MAGIC_DAMAGE_ChaScore4_TARGET"; break; default: return; @@ -1941,23 +1941,23 @@ void sendScoreModifierSpellMessage( const CEntityId &aggressorId, const CEntityI // // Send to 'speech' group // switch( score ) // { -// case SCORES::hit_points: +// case SCORES::cha_score1: // if ( value > 0) -// msgName = self ? "MAGIC_SELF_HEAL_HP_SPECTATORS" : "MAGIC_HEAL_HP_SPECTATORS"; +// msgName = self ? "MAGIC_SELF_HEAL_ChaScore1_SPECTATORS" : "MAGIC_HEAL_ChaScore1_SPECTATORS"; // else -// msgName = self ? "MAGIC_SELF_DAMAGE_HP_SPECTATORS" : "MAGIC_DAMAGE_HP_SPECTATORS"; +// msgName = self ? "MAGIC_SELF_DAMAGE_ChaScore1_SPECTATORS" : "MAGIC_DAMAGE_ChaScore1_SPECTATORS"; // break; -// case SCORES::stamina: +// case SCORES::ChaScore2: // if (value > 0) -// msgName = self ? "MAGIC_SELF_HEAL_STA_SPECTATORS" : "MAGIC_HEAL_STA_SPECTATORS"; +// msgName = self ? "MAGIC_SELF_HEAL_ChaScore2_SPECTATORS" : "MAGIC_HEAL_ChaScore2_SPECTATORS"; // else -// msgName = self ? "MAGIC_SELF_DAMAGE_STA_SPECTATORS" : "MAGIC_DAMAGE_STA_SPECTATORS"; +// msgName = self ? "MAGIC_SELF_DAMAGE_ChaScore2_SPECTATORS" : "MAGIC_DAMAGE_ChaScore2_SPECTATORS"; // break; -// case SCORES::sap: +// case SCORES::ChaScore3: // if (value > 0) -// msgName = self ? "MAGIC_SELF_HEAL_SAP_SPECTATORS" : "MAGIC_HEAL_SAP_SPECTATORS"; +// msgName = self ? "MAGIC_SELF_HEAL_ChaScore3_SPECTATORS" : "MAGIC_HEAL_ChaScore3_SPECTATORS"; // else -// msgName = self ? "MAGIC_SELF_DAMAGE_SAP_SPECTATORS" : "MAGIC_DAMAGE_SAP_SPECTATORS"; +// msgName = self ? "MAGIC_SELF_DAMAGE_ChaScore3_SPECTATORS" : "MAGIC_DAMAGE_ChaScore3_SPECTATORS"; // break; // default: // return; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_utilities_functions.h b/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_utilities_functions.h index 83e88ded2..005693c4a 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_utilities_functions.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_utilities_functions.h @@ -225,16 +225,16 @@ inline void sendDeathMessages( const TDataSetRow &killerRowId, const TDataSetRow * \param self flag indicating of aggressor self hitting * \param sentence pointer on the calling sentence if any * \param amount the amount of damage dealt to the victim entity - * \param lostStamina the amount of stamina lost by the victim entity - * \param lostSap the amount of sap lost by the victim entity + * \param lostChaScore2 the amount of ChaScore2 lost by the victim entity + * \param lostChaScore3 the amount of ChaScore3 lost by the victim entity */ -void sendHitMessages( const NLMISC::CEntityId &aggressorId, const NLMISC::CEntityId &victimId, bool self, sint32 amount, sint32 maxDamage, sint32 lostStamina = 0, sint32 lostSap = 0, BODY::TBodyPart bodyPart= BODY::UnknownBodyPart); +void sendHitMessages( const NLMISC::CEntityId &aggressorId, const NLMISC::CEntityId &victimId, bool self, sint32 amount, sint32 maxDamage, sint32 lostChaScore2 = 0, sint32 lostChaScore3 = 0, BODY::TBodyPart bodyPart= BODY::UnknownBodyPart); -inline void sendHitMessages( const TDataSetRow &aggressorRowId, const TDataSetRow &victimRowId, bool self, sint32 amount, sint32 maxDamage, sint32 lostStamina = 0, sint32 lostSap = 0, BODY::TBodyPart bodyPart= BODY::UnknownBodyPart) +inline void sendHitMessages( const TDataSetRow &aggressorRowId, const TDataSetRow &victimRowId, bool self, sint32 amount, sint32 maxDamage, sint32 lostChaScore2 = 0, sint32 lostChaScore3 = 0, BODY::TBodyPart bodyPart= BODY::UnknownBodyPart) { if (TheDataset.isAccessible(aggressorRowId) && TheDataset.isAccessible(victimRowId)) { - sendHitMessages( TheDataset.getEntityId( aggressorRowId ), TheDataset.getEntityId( victimRowId ), self, amount, maxDamage, lostStamina, lostSap, bodyPart ); + sendHitMessages( TheDataset.getEntityId( aggressorRowId ), TheDataset.getEntityId( victimRowId ), self, amount, maxDamage, lostChaScore2, lostChaScore3, bodyPart ); } } @@ -243,17 +243,17 @@ inline void sendHitMessages( const TDataSetRow &aggressorRowId, const TDataSetRo * \param woundedEntity the entity wounded by the damage shield * \param defender the entity dealing the damage via it's DS * \param damage the amount of damage dealt to the wounded entity - * \param hpDrain the amount of HP gained by the defender + * \param ChaScore1Drain the amount of ChaScore1 gained by the defender */ -void sendDamageShieldDamageMessages(const NLMISC::CEntityId &woundedEntity, const NLMISC::CEntityId &defender, uint16 damage, uint16 hpDrain); +void sendDamageShieldDamageMessages(const NLMISC::CEntityId &woundedEntity, const NLMISC::CEntityId &defender, uint16 damage, uint16 ChaScore1Drain); /** - * a vampirism proc was triggered, damage done are converted to hp transfer - * \param actingEntity the entity inflicting the damages and receiving the hp - * \param defender the entity receiving the damage and losing hp - * \param hpDrain the amount of HP transfered + * a vampirism proc was triggered, damage done are converted to ChaScore1 transfer + * \param actingEntity the entity inflicting the damages and receiving the ChaScore1 + * \param defender the entity receiving the damage and losing ChaScore1 + * \param ChaScore1Drain the amount of ChaScore1 transfered */ -void sendVampirismProcMessages(const NLMISC::CEntityId &actingEntity, const NLMISC::CEntityId &defender, sint32 hpDrain); +void sendVampirismProcMessages(const NLMISC::CEntityId &actingEntity, const NLMISC::CEntityId &defender, sint32 ChaScore1Drain); void sendItemSpecialEffectProcMessage(ITEM_SPECIAL_EFFECT::TItemSpecialEffect type, CEntityBase* actor, CEntityBase* target=NULL, sint32 param=0, sint32 param2=0); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_dot.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_dot.cpp index a2348a448..0de392f84 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_dot.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_dot.cpp @@ -70,18 +70,18 @@ bool CSLinkEffectDot::update(CTimerEvent * event, bool applyEffect) } float mult = _ResistFactor; - sint32 realDmg = sint32( _DmgHp * mult ); + sint32 realDmg = sint32( _DmgChaScore1 * mult ); realDmg = target->applyDamageOnArmor( _DmgType, realDmg ); if ( caster != NULL && _Vampirise && caster->getId().getType() == RYZOMID::player) { - SCharacteristicsAndScores &scoreHp = target->getScores()._PhysicalScores[SCORES::hit_points]; + SCharacteristicsAndScores &scoreChaScore1 = target->getScores()._PhysicalScores[SCORES::cha_score1]; sint32 vampirise = (sint32)(realDmg * _VampiriseRatio); - if ( realDmg > scoreHp.Current ) - vampirise = scoreHp.Current; + if ( realDmg > scoreChaScore1.Current ) + vampirise = scoreChaScore1.Current; if ( vampirise > _Vampirise ) vampirise = _Vampirise; - caster->changeCurrentHp( vampirise, caster->getEntityRowId() ); + caster->changeCurrentChaScore1( vampirise, caster->getEntityRowId() ); SM_STATIC_PARAMS_2(params, STRING_MANAGER::entity, STRING_MANAGER::integer); params[0].setEIdAIAlias( target->getId(), CAIAliasTranslator::getInstance()->getAIAlias(target->getId()) ); params[1].Int = vampirise; @@ -96,83 +96,83 @@ bool CSLinkEffectDot::update(CTimerEvent * event, bool applyEffect) // compute aggro - sint32 max = target->getPhysScores()._PhysicalScores[SCORES::hit_points].Max; + sint32 max = target->getPhysScores()._PhysicalScores[SCORES::cha_score1].Max; if (max) { float aggro = (-1) * float(realDmg)/float(max); if (aggro < -1 ) aggro = -1.0f; report.AggroAdd = (float)aggro; - report.addDelta(AI_EVENT_REPORT::HitPoints, (-1)*realDmg); + report.addDelta(AI_EVENT_REPORT::ChaScore1, (-1)*realDmg); CPhraseManager::getInstance().addAiEventReport(report); } - // sap - sint32 realDmgSap = 0; + // ChaScore3 + sint32 realDmgChaScore3 = 0; { - SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::sap]; - realDmgSap = sint32( _DmgSap * mult ); - realDmgSap = target->applyDamageOnArmor( _DmgType, realDmgSap ); - if ( realDmgSap != 0) + SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score3]; + realDmgChaScore3 = sint32( _DmgChaScore3 * mult ); + realDmgChaScore3 = target->applyDamageOnArmor( _DmgType, realDmgChaScore3 ); + if ( realDmgChaScore3 != 0) { - score.Current = score.Current - realDmgSap; + score.Current = score.Current - realDmgChaScore3; if ( score.Current <= 0) score.Current = 0; - PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster->getId(), target->getId(), -realDmgSap , -sint32( _DmgSap * mult ), SCORES::sap , ACTNATURE::OFFENSIVE_MAGIC); - _Report.Sap = realDmgSap; + PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster->getId(), target->getId(), -realDmgChaScore3 , -sint32( _DmgChaScore3 * mult ), SCORES::cha_score3 , ACTNATURE::OFFENSIVE_MAGIC); + _Report.ChaScore3 = realDmgChaScore3; // aggro - max = target->getPhysScores()._PhysicalScores[SCORES::sap].Max; + max = target->getPhysScores()._PhysicalScores[SCORES::cha_score3].Max; if (max) { - float aggro = (-1) * float(realDmgSap)/float(max); + float aggro = (-1) * float(realDmgChaScore3)/float(max); if (aggro < -1 ) aggro = -1.0f; report.AggroAdd = (float)aggro; - report.addDelta(AI_EVENT_REPORT::Sap, -realDmgSap); + report.addDelta(AI_EVENT_REPORT::ChaScore3, -realDmgChaScore3); CPhraseManager::getInstance().addAiEventReport(report); } } } - // stamina - sint32 realDmgSta = 0; + // ChaScore2 + sint32 realDmgChaScore2 = 0; { - SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::stamina]; - realDmgSta = sint32( _DmgSta * mult ); - realDmgSta = target->applyDamageOnArmor( _DmgType, realDmgSta ); - if (realDmgSta != 0) + SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score2]; + realDmgChaScore2 = sint32( _DmgChaScore2 * mult ); + realDmgChaScore2 = target->applyDamageOnArmor( _DmgType, realDmgChaScore2 ); + if (realDmgChaScore2 != 0) { - score.Current = score.Current - realDmgSta; + score.Current = score.Current - realDmgChaScore2; if ( score.Current <= 0) score.Current = 0; - PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster->getId(), target->getId(), -realDmgSta, -sint32( _DmgSta * mult ), SCORES::stamina , ACTNATURE::OFFENSIVE_MAGIC); - _Report.Sta = realDmgSta; + PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster->getId(), target->getId(), -realDmgChaScore2, -sint32( _DmgChaScore2 * mult ), SCORES::cha_score2 , ACTNATURE::OFFENSIVE_MAGIC); + _Report.ChaScore2 = realDmgChaScore2; // aggro - max = target->getPhysScores()._PhysicalScores[SCORES::stamina].Max; + max = target->getPhysScores()._PhysicalScores[SCORES::cha_score2].Max; if (max) { - float aggro = (-1) * float(realDmgSta)/float(max); + float aggro = (-1) * float(realDmgChaScore2)/float(max); if (aggro < -1 ) aggro = -1.0f; report.AggroAdd = (float)aggro; - report.addDelta(AI_EVENT_REPORT::Stamina, (-1)*realDmgSta); + report.addDelta(AI_EVENT_REPORT::ChaScore2, (-1)*realDmgChaScore2); CPhraseManager::getInstance().addAiEventReport(report); } } } - _Report.Hp = realDmg; + _Report.ChaScore1 = realDmg; PROGRESSIONPVE::CCharacterProgressionPVE::getInstance()->actionReport( _Report ); PROGRESSIONPVP::CCharacterProgressionPVP::getInstance()->reportAction(_Report); - if ( target->changeCurrentHp( - realDmg, caster->getEntityRowId() ) ) + if ( target->changeCurrentChaScore1( - realDmg, caster->getEntityRowId() ) ) { - PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster->getId(), target->getId(), -realDmg, -sint32( _DmgHp * mult ), SCORES::hit_points , ACTNATURE::OFFENSIVE_MAGIC); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster->getId(), target->getId(), -realDmg, -sint32( _DmgChaScore1 * mult ), SCORES::cha_score1 , ACTNATURE::OFFENSIVE_MAGIC); PHRASE_UTILITIES::sendDeathMessages( caster->getId(), target->getId() ); } else { - PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster->getId(), target->getId(), -realDmg, -sint32( _DmgHp * mult ), SCORES::hit_points , ACTNATURE::OFFENSIVE_MAGIC); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster->getId(), target->getId(), -realDmg, -sint32( _DmgChaScore1 * mult ), SCORES::cha_score1 , ACTNATURE::OFFENSIVE_MAGIC); } return false; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_dot.h b/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_dot.h index c49c0cd4f..7d13b430c 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_dot.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_dot.h @@ -34,10 +34,10 @@ public: DMGTYPE::EDamageType dmgType, uint8 power, TReportAction& report, - sint32 dmgHp,sint32 dmgSap,sint32 dmgSta,sint32 vampirise, float vampiriseRatio ) + sint32 dmgChaScore1,sint32 dmgChaScore3,sint32 dmgChaScore2,sint32 vampirise, float vampiriseRatio ) :CSLinkEffectOffensive ( creatorRowId,targetRowId,EFFECT_FAMILIES::Dot,cost,energyCost, skill, maxDistance, 0,power, report ), _DmgType( dmgType ), - _DmgHp( dmgHp), _DmgSap( dmgSap), _DmgSta(dmgSta),_Vampirise(vampirise),_VampiriseRatio(vampiriseRatio), + _DmgChaScore1( dmgChaScore1), _DmgChaScore3( dmgChaScore3), _DmgChaScore2(dmgChaScore2),_Vampirise(vampirise),_VampiriseRatio(vampiriseRatio), _FirstUpdate(true) { _MagicFxType = MAGICFX::toMagicFx(dmgType, true); @@ -52,9 +52,9 @@ public: protected: DMGTYPE::EDamageType _DmgType; - sint32 _DmgHp; - sint32 _DmgSap; - sint32 _DmgSta; + sint32 _DmgChaScore1; + sint32 _DmgChaScore2; + sint32 _DmgChaScore3; sint32 _Vampirise; float _VampiriseRatio; bool _FirstUpdate; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_hot.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_hot.cpp index 87c417cc9..e4276ec9c 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_hot.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_hot.cpp @@ -64,12 +64,12 @@ bool CSLinkEffectHot::update(CTimerEvent * event, bool applyEffect) return true; } - applyOnScore( caster, target,SCORES::hit_points, _HealHp ); - _Report.Hp = _HealHp; - applyOnScore( caster, target,SCORES::sap, _HealSap ); - _Report.Sap = _HealSap; - applyOnScore( caster, target,SCORES::stamina, _HealSta ); - _Report.Sta = _HealSta; + applyOnScore( caster, target,SCORES::cha_score1, _HealChaScore1 ); + _Report.ChaScore1 = _HealChaScore1; + applyOnScore( caster, target,SCORES::cha_score2, _HealChaScore2 ); + _Report.ChaScore2 = _HealChaScore2; + applyOnScore( caster, target,SCORES::cha_score3, _HealChaScore3 ); + _Report.ChaScore3 = _HealChaScore3; PROGRESSIONPVE::CCharacterProgressionPVE::getInstance()->actionReport( _Report ); PROGRESSIONPVP::CCharacterProgressionPVP::getInstance()->reportAction(_Report); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_hot.h b/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_hot.h index 62ca02969..c40dfcda2 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_hot.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/s_link_effect_hot.h @@ -33,11 +33,11 @@ public: uint32 maxDistance, uint8 power, TReportAction& report, - sint32 healHp, sint32 healSap, sint32 healSta) + sint32 healChaScore1, sint32 healChaScore3, sint32 healChaScore2) :CSLinkEffect ( creatorRowId,targetRowId,EFFECT_FAMILIES::Hot, cost,energyCost,skill,maxDistance, 0,power,report), - _HealHp(healHp),_HealSap(healSap),_HealSta(healSta),_FirstUpdate(true) + _HealChaScore1(healChaScore1),_HealChaScore3(healChaScore3),_HealChaScore2(healChaScore2),_FirstUpdate(true) { - _MagicFxType = MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,true); + _MagicFxType = MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,true); _Report.ActionNature = ACTNATURE::CURATIVE_MAGIC; } @@ -48,9 +48,9 @@ public: protected: void applyOnScore( CEntityBase * caster, CEntityBase * target,SCORES::TScores scoreType, sint32& value ); - sint32 _HealHp; - sint32 _HealSap; - sint32 _HealSta; + sint32 _HealChaScore1; + sint32 _HealChaScore3; + sint32 _HealChaScore2; bool _FirstUpdate; }; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_balance.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_balance.cpp index 38382ac9a..e5677c766 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_balance.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_balance.cpp @@ -88,7 +88,7 @@ void CSpecialPowerBalance::apply() return; #if !FINAL_VERSION - nlassert(_AffectedScore==SCORES::hit_points || _AffectedScore==SCORES::sap || _AffectedScore==SCORES::stamina); + nlassert(_AffectedScore==SCORES::cha_score1 || _AffectedScore==SCORES::cha_score2 || _AffectedScore==SCORES::cha_score3); #endif CCharacter *actor = PlayerManager.getChar(_ActorRowId); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_balance.h b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_balance.h index 79ef8e429..8aa0b4436 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_balance.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_balance.h @@ -34,7 +34,7 @@ public: CSpecialPowerBalance(TDataSetRow actorRowId, CSpecialPowerPhrase *phrase, float disableTimeInSeconds, float lossFactor, float range, POWERS::TPowerType powerType) :CSpecialPower() { - _AffectedScore = SCORES::hit_points; + _AffectedScore = SCORES::cha_score1; _Phrase = phrase; _LossFactor = lossFactor; _Range = range; @@ -64,7 +64,7 @@ protected: float _LossFactor; /// max Range in meters float _Range; - /// affected score (Hp, sap, sta) + /// affected score (ChaScore1, ChaScore2, ChaScore3) SCORES::TScores _AffectedScore; }; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_basic_aura.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_basic_aura.cpp index 5e43c78e4..47a6607bd 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_basic_aura.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_basic_aura.cpp @@ -83,14 +83,14 @@ void CSpecialPowerBasicAura::apply() switch(_PowerType) { - case POWERS::LifeAura: - fx.Aura = MAGICFX::AuraHp; + case POWERS::ChaScore1Aura: + fx.Aura = MAGICFX::AuraChaScore1; break; - case POWERS::StaminaAura: - fx.Aura = MAGICFX::AuraSta; + case POWERS::ChaScore2Aura: + fx.Aura = MAGICFX::AuraChaScore2; break; - case POWERS::SapAura: - fx.Aura = MAGICFX::AuraSap; + case POWERS::ChaScore3Aura: + fx.Aura = MAGICFX::AuraChaScore3; break; case POWERS::MeleeProtection: fx.Aura = MAGICFX::ProtectionMelee; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_dot.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_dot.cpp index 6ef103a63..d51cf44a3 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_dot.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_dot.cpp @@ -63,7 +63,7 @@ void CSpecialPowerDoT::apply() // create effect and apply it on actor const TGameCycle endDate = _Duration + CTickEventHandler::getGameCycle(); - CNoLinkDOTEffect *effect = new CNoLinkDOTEffect(_ActorRowId, _ActorRowId, _EffectFamily, _ParamValue, endDate, _UpdateFrequency, SCORES::hit_points, _DamagePerUpdate, DMGTYPE::UNDEFINED); + CNoLinkDOTEffect *effect = new CNoLinkDOTEffect(_ActorRowId, _ActorRowId, _EffectFamily, _ParamValue, endDate, _UpdateFrequency, SCORES::cha_score1, _DamagePerUpdate, DMGTYPE::UNDEFINED); if (effect) { effect->endsAtCasterDeath(false); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_enchant_weapon.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_enchant_weapon.cpp index 4c1663693..cb4ea372d 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_enchant_weapon.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_enchant_weapon.cpp @@ -92,7 +92,7 @@ void CSpecialPowerEnchantWeapon::apply() TGameCycle const endDate = _Duration + CTickEventHandler::getGameCycle(); float damageBonus = _DpsBonus * 10.f / item->hitRate(); - CEnchantWeaponEffect* effect = new CEnchantWeaponEffect(_ActorRowId, _ActorRowId, _EffectFamily, _ParamValue, endDate, _DamageType, SCORES::hit_points, damageBonus, DMGTYPE::UNDEFINED); + CEnchantWeaponEffect* effect = new CEnchantWeaponEffect(_ActorRowId, _ActorRowId, _EffectFamily, _ParamValue, endDate, _DamageType, SCORES::cha_score1, damageBonus, DMGTYPE::UNDEFINED); if (effect) { effect->endsAtCasterDeath(true); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_heal.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_heal.cpp index a7a0aa217..29a8851c5 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_heal.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_heal.cpp @@ -70,7 +70,7 @@ void CSpecialPowerHeal::apply() return; #if !FINAL_VERSION - nlassert(_AffectedScore==SCORES::hit_points || _AffectedScore==SCORES::sap || _AffectedScore==SCORES::stamina || _AffectedScore==SCORES::focus); + nlassert(_AffectedScore==SCORES::cha_score1 || _AffectedScore==SCORES::cha_score2 || _AffectedScore==SCORES::cha_score3 || _AffectedScore==SCORES::cha_score4); #endif CCharacter *actor = PlayerManager.getChar(_ActorRowId); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_heal.h b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_heal.h index 8e24d7aab..969243430 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_heal.h +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_heal.h @@ -37,7 +37,7 @@ public: CSpecialPowerHeal(TDataSetRow actorRowId, CSpecialPowerPhrase *phrase, float disableTimeInSeconds, sint32 healValue, float healFactorValue, POWERS::TPowerType powerType) :CSpecialPower() { - _AffectedScore = SCORES::hit_points; + _AffectedScore = SCORES::cha_score1; _Phrase = phrase; _HealValue = healValue; _HealFactorValue = healFactorValue; @@ -66,11 +66,11 @@ public: virtual void apply(); protected: - /// affected score (Hp, sap, sta) + /// affected score (ChaScore1, ChaScore2, ChaScore3) SCORES::TScores _AffectedScore; /// healing value sint32 _HealValue; - /// heal factor value, in % of max HP + /// heal factor value, in % of max ChaScore1 float _HealFactorValue; }; diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_phrase.cpp index 84d4d31fb..03d22a881 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/special_power_phrase.cpp @@ -178,98 +178,98 @@ void CSpecialPowerPhrase::processParams(const vector ¶m break; } - case TBrickParam::SP_LIFE_AURA: + case TBrickParam::SP_ChaScore1_AURA: { - // $*STRUCT CSBrickParamLifeAura: public TBrickParam::CId + // $*STRUCT CSBrickParamChaScore1Aura: public TBrickParam::CId // $*-i uint16 RegenMod // regen modifier // $*-f float Duration // duration in seconds // $*-f float Radius // aura radius in meters - // $*-f float TargetDisableTime // disable life aura for x seconds on targets - // $*-f float UserDisableTime // disable life aura for x seconds on user - CSpecialPowerBasicAura *lifeAura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamLifeAura *)param)->Duration, ((CSBrickParamLifeAura *)param)->UserDisableTime, ((CSBrickParamLifeAura *)param)->TargetDisableTime, POWERS::LifeAura); - if (lifeAura) + // $*-f float TargetDisableTime // disable ChaScore1 aura for x seconds on targets + // $*-f float UserDisableTime // disable ChaScore1 aura for x seconds on user + CSpecialPowerBasicAura *ChaScore1Aura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamChaScore1Aura *)param)->Duration, ((CSBrickParamChaScore1Aura *)param)->UserDisableTime, ((CSBrickParamChaScore1Aura *)param)->TargetDisableTime, POWERS::ChaScore1Aura); + if (ChaScore1Aura) { - lifeAura->setRadius(((CSBrickParamLifeAura *)param)->Radius); - lifeAura->setFamilies(EFFECT_FAMILIES::PowerRootLifeAura,EFFECT_FAMILIES::PowerLifeAura ); - lifeAura->setParamValue(((CSBrickParamLifeAura *)param)->RegenMod); - lifeAura->setByPass(isConsumable); - _Powers.push_back(lifeAura); + ChaScore1Aura->setRadius(((CSBrickParamChaScore1Aura *)param)->Radius); + ChaScore1Aura->setFamilies(EFFECT_FAMILIES::PowerRootChaScore1Aura,EFFECT_FAMILIES::PowerChaScore1Aura ); + ChaScore1Aura->setParamValue(((CSBrickParamChaScore1Aura *)param)->RegenMod); + ChaScore1Aura->setByPass(isConsumable); + _Powers.push_back(ChaScore1Aura); } } break; - case TBrickParam::SP_LIFE_AURA2: + case TBrickParam::SP_ChaScore1_AURA2: { - // $*STRUCT CSBrickParamLifeAura: public TBrickParam::CId + // $*STRUCT CSBrickParamChaSCore1Aura: public TBrickParam::CId // $*-i uint16 RegenMod // regen modifier proportionally to item level // $*-f float Duration // duration in seconds // $*-f float Radius // aura radius in meters - // $*-f float TargetDisableTime // disable life aura for x seconds on targets - // $*-f float UserDisableTime // disable life aura for x seconds on user - CSpecialPowerBasicAura *lifeAura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamLifeAura *)param)->Duration, ((CSBrickParamLifeAura *)param)->UserDisableTime, ((CSBrickParamLifeAura *)param)->TargetDisableTime, POWERS::LifeAura); - if (lifeAura) + // $*-f float TargetDisableTime // disable ChaScore1 aura for x seconds on targets + // $*-f float UserDisableTime // disable ChaScore1 aura for x seconds on user + CSpecialPowerBasicAura *ChaScore1Aura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamChaScore1Aura *)param)->Duration, ((CSBrickParamChaScore1Aura *)param)->UserDisableTime, ((CSBrickParamChaScore1Aura *)param)->TargetDisableTime, POWERS::ChaScore1Aura); + if (ChaScore1Aura) { - lifeAura->setRadius(((CSBrickParamLifeAura *)param)->Radius); - lifeAura->setFamilies(EFFECT_FAMILIES::PowerRootLifeAura,EFFECT_FAMILIES::PowerLifeAura ); - lifeAura->setParamValue(((CSBrickParamLifeAura *)param)->RegenMod*quality); - lifeAura->setByPass(isConsumable); - _Powers.push_back(lifeAura); + ChaScore1Aura->setRadius(((CSBrickParamChaScore1Aura *)param)->Radius); + ChaScore1Aura->setFamilies(EFFECT_FAMILIES::PowerRootChaScore1Aura,EFFECT_FAMILIES::PowerChaScore1Aura ); + ChaScore1Aura->setParamValue(((CSBrickParamChaScore1Aura *)param)->RegenMod*quality); + ChaScore1Aura->setByPass(isConsumable); + _Powers.push_back(ChaScore1Aura); } } break; - case TBrickParam::SP_STAMINA_AURA: + case TBrickParam::SP_ChaScore2_AURA: { - CSpecialPowerBasicAura *staminaAura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamStaminaAura*)param)->Duration, ((CSBrickParamLifeAura *)param)->UserDisableTime, ((CSBrickParamStaminaAura *)param)->TargetDisableTime, POWERS::StaminaAura); - if (staminaAura) + CSpecialPowerBasicAura *ChaScore2Aura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamChaScore2Aura*)param)->Duration, ((CSBrickParamChaScore1Aura *)param)->UserDisableTime, ((CSBrickParamChaScore2Aura *)param)->TargetDisableTime, POWERS::ChaScore2Aura); + if (ChaScore2Aura) { - staminaAura->setRadius(((CSBrickParamStaminaAura *)param)->Radius); - staminaAura->setFamilies(EFFECT_FAMILIES::PowerRootStaminaAura,EFFECT_FAMILIES::PowerStaminaAura ); - staminaAura->setParamValue(((CSBrickParamStaminaAura *)param)->RegenMod); - staminaAura->setByPass(isConsumable); - _Powers.push_back(staminaAura); + ChaScore2Aura->setRadius(((CSBrickParamChaScore2Aura *)param)->Radius); + ChaScore2Aura->setFamilies(EFFECT_FAMILIES::PowerRootChaScore2Aura,EFFECT_FAMILIES::PowerChaScore2Aura ); + ChaScore2Aura->setParamValue(((CSBrickParamChaScore2Aura *)param)->RegenMod); + ChaScore2Aura->setByPass(isConsumable); + _Powers.push_back(ChaScore2Aura); } } break; - case TBrickParam::SP_STAMINA_AURA2: + case TBrickParam::SP_ChaScore2_AURA2: { - CSpecialPowerBasicAura *staminaAura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamStaminaAura*)param)->Duration, ((CSBrickParamLifeAura *)param)->UserDisableTime, ((CSBrickParamStaminaAura *)param)->TargetDisableTime, POWERS::StaminaAura); - if (staminaAura) + CSpecialPowerBasicAura *ChaScore2Aura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamChaScore2Aura*)param)->Duration, ((CSBrickParamChaScore1Aura *)param)->UserDisableTime, ((CSBrickParamChaScore2Aura *)param)->TargetDisableTime, POWERS::ChaScore2Aura); + if (ChaScore2Aura) { - staminaAura->setRadius(((CSBrickParamStaminaAura *)param)->Radius); - staminaAura->setFamilies(EFFECT_FAMILIES::PowerRootStaminaAura,EFFECT_FAMILIES::PowerStaminaAura ); - staminaAura->setParamValue(((CSBrickParamStaminaAura *)param)->RegenMod*quality); - staminaAura->setByPass(isConsumable); - _Powers.push_back(staminaAura); + ChaScore2Aura->setRadius(((CSBrickParamChaScore2Aura *)param)->Radius); + ChaScore2Aura->setFamilies(EFFECT_FAMILIES::PowerRootChaScore2Aura,EFFECT_FAMILIES::PowerChaScore2Aura ); + ChaScore2Aura->setParamValue(((CSBrickParamChaScore2Aura *)param)->RegenMod*quality); + ChaScore2Aura->setByPass(isConsumable); + _Powers.push_back(ChaScore2Aura); } } break; - case TBrickParam::SP_SAP_AURA: + case TBrickParam::SP_ChaScore3_AURA: { - CSpecialPowerBasicAura *sapAura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamSapAura*)param)->Duration, ((CSBrickParamLifeAura *)param)->UserDisableTime, ((CSBrickParamSapAura *)param)->TargetDisableTime, POWERS::SapAura); - if (sapAura) + CSpecialPowerBasicAura *ChaScore3Aura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamChaScore3Aura*)param)->Duration, ((CSBrickParamChaScore1Aura *)param)->UserDisableTime, ((CSBrickParamChaScore3Aura *)param)->TargetDisableTime, POWERS::ChaScore3Aura); + if (ChaScore3Aura) { - sapAura->setRadius(((CSBrickParamSapAura *)param)->Radius); - sapAura->setFamilies(EFFECT_FAMILIES::PowerRootSapAura,EFFECT_FAMILIES::PowerSapAura ); - sapAura->setParamValue(((CSBrickParamSapAura *)param)->RegenMod); - sapAura->setByPass(isConsumable); - _Powers.push_back(sapAura); + ChaScore3Aura->setRadius(((CSBrickParamChaScore3Aura *)param)->Radius); + ChaScore3Aura->setFamilies(EFFECT_FAMILIES::PowerRootChaScore3Aura,EFFECT_FAMILIES::PowerChaScore3Aura ); + ChaScore3Aura->setParamValue(((CSBrickParamChaScore3Aura *)param)->RegenMod); + ChaScore3Aura->setByPass(isConsumable); + _Powers.push_back(ChaScore3Aura); } } break; - case TBrickParam::SP_SAP_AURA2: + case TBrickParam::SP_ChaScore3_AURA2: { - CSpecialPowerBasicAura *sapAura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamSapAura*)param)->Duration, ((CSBrickParamLifeAura *)param)->UserDisableTime, ((CSBrickParamSapAura *)param)->TargetDisableTime, POWERS::SapAura); - if (sapAura) + CSpecialPowerBasicAura *ChaScore3Aura = new CSpecialPowerBasicAura(_ActorRowId, this, ((CSBrickParamChaScore3Aura*)param)->Duration, ((CSBrickParamChaScore1Aura *)param)->UserDisableTime, ((CSBrickParamChaScore3Aura *)param)->TargetDisableTime, POWERS::ChaScore3Aura); + if (ChaScore3Aura) { - sapAura->setRadius(((CSBrickParamSapAura *)param)->Radius); - sapAura->setFamilies(EFFECT_FAMILIES::PowerRootSapAura,EFFECT_FAMILIES::PowerSapAura ); - sapAura->setParamValue(((CSBrickParamSapAura *)param)->RegenMod*quality); - sapAura->setByPass(isConsumable); - _Powers.push_back(sapAura); + ChaScore3Aura->setRadius(((CSBrickParamChaScore3Aura *)param)->Radius); + ChaScore3Aura->setFamilies(EFFECT_FAMILIES::PowerRootChaScore3Aura,EFFECT_FAMILIES::PowerChaScore3Aura ); + ChaScore3Aura->setParamValue(((CSBrickParamChaScore3Aura *)param)->RegenMod*quality); + ChaScore3Aura->setByPass(isConsumable); + _Powers.push_back(ChaScore3Aura); } } break; @@ -507,7 +507,7 @@ void CSpecialPowerPhrase::processParams(const vector ¶m // $*-f float Range // power range // $*-f float LossFactor // score loss factor (0.5 = 50%, 0.3 = 30% loss..) const CSBrickParamBalance *cp = (CSBrickParamBalance*) (param); - CSpecialPowerBalance *power = new CSpecialPowerBalance( _ActorRowId, this, cp->DisableTime, cp->LossFactor/100.0f, cp->Range, POWERS::BalanceHp ); + CSpecialPowerBalance *power = new CSpecialPowerBalance( _ActorRowId, this, cp->DisableTime, cp->LossFactor/100.0f, cp->Range, POWERS::BalanceChaScore1 ); if (power) { power->setAffectedScore( SCORES::toScore(cp->AffectedScore) ); @@ -524,7 +524,7 @@ void CSpecialPowerPhrase::processParams(const vector ¶m // $*-i sint32 HealValue // value added to affected score // $*-f float HealFactorValue // value added to affected score in % of max target score // $*-f float DisableTime // disable power for x seconds - // $*-s std::string PowerType // type of power (Heal, HealHpC ...) + // $*-s std::string PowerType // type of power (Heal, HealChaScore1C ...) const CSBrickParamHeal *cp = (CSBrickParamHeal*) (param); if ( cp->HealValue > 0 || cp->HealFactorValue > 0.0f) { diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/toxic_cloud.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/toxic_cloud.cpp index 7aa0d0eb4..c65501a30 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/toxic_cloud.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/toxic_cloud.cpp @@ -129,7 +129,7 @@ bool CToxicCloud::update() if ( !entity->isDead()) { - bool killed = entity->changeCurrentHp( -_DmgPerHit ); // is not blocked by any armor + bool killed = entity->changeCurrentChaScore1( -_DmgPerHit ); // is not blocked by any armor PHRASE_UTILITIES::sendNaturalEventHitMessages( RYZOMID::fx_entity, entity->getEntityRowId(), _DmgPerHit, _DmgPerHit ); if ( killed ) { diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp index 259a0fc6f..d8f4429b2 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp @@ -486,14 +486,14 @@ CCharacter::CCharacter(): CEntityBase(false), */ _DateOfNextAllowedAction = 0; - _OldHpBarSentToTeam = 0; - _OldSapBarSentToTeam = 0; - _OldStaBarSentToTeam = 0; + _OldChaScore1BarSentToTeam = 0; + _OldChaScore3BarSentToTeam = 0; + _OldChaScore2BarSentToTeam = 0; - _OldHpBarSentToPlayer = 0; - _OldSapBarSentToPlayer = 0; - _OldStaBarSentToPlayer = 0; - _OldFocusBarSentToPlayer = 0; + _OldChaScore1BarSentToPlayer = 0; + _OldChaScore3BarSentToPlayer = 0; + _OldChaScore2BarSentToPlayer = 0; + _OldChaScore4BarSentToPlayer = 0; _BarSentToPlayerMsgNumber = 0; @@ -1071,33 +1071,33 @@ uint32 CCharacter::tickUpdate() _GameEvent->tickUpdate(); // keep old score values for reference - sint32 oldHp = _PhysScores._PhysicalScores[ SCORES::hit_points ].Current; - sint32 oldSta = _PhysScores._PhysicalScores[ SCORES::stamina].Current; - sint32 oldSap = _PhysScores._PhysicalScores[ SCORES::sap ].Current; - sint32 oldFocus = _PhysScores._PhysicalScores[ SCORES::focus].Current; + sint32 oldChaScore1 = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current; + sint32 oldChaScore2 = _PhysScores._PhysicalScores[ SCORES::cha_score2].Current; + sint32 oldChaScore3 = _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Current; + sint32 oldChaScore4 = _PhysScores._PhysicalScores[ SCORES::cha_score4].Current; if( _GodMode || _Invulnerable ) { - if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Current <= 0 ) + if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current <= 0 ) { - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = _PhysScores._PhysicalScores[ SCORES::hit_points ].Base; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base; } - if( _PhysScores._PhysicalScores[ SCORES::stamina ].Current < _PhysScores._PhysicalScores[ SCORES::stamina ].Base / 3 ) + if( _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Current < _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Base / 3 ) { - _PhysScores._PhysicalScores[ SCORES::stamina ].Current = _PhysScores._PhysicalScores[ SCORES::stamina ].Base; + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Base; } - if( _PhysScores._PhysicalScores[ SCORES::sap ].Current < _PhysScores._PhysicalScores[ SCORES::sap ].Base / 3 ) + if( _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Current < _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Base / 3 ) { - _PhysScores._PhysicalScores[ SCORES::sap ].Current = _PhysScores._PhysicalScores[ SCORES::sap ].Base; + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Base; } - if( _PhysScores._PhysicalScores[ SCORES::focus ].Current < _PhysScores._PhysicalScores[ SCORES::focus ].Base / 3 ) + if( _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Current < _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Base / 3 ) { - _PhysScores._PhysicalScores[ SCORES::focus ].Current = _PhysScores._PhysicalScores[ SCORES::focus ].Base; + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Base; } } // Check Death of player and manage pact if death occurs - if( currentHp() <= 0 && !_IsDead && !teleportInProgress() ) + if( currentChaScore1() <= 0 && !_IsDead && !teleportInProgress() ) { kill(); if( !checkCharacterStillValide(" Character corrupted : after kill() !!!") ) @@ -1152,7 +1152,7 @@ uint32 CCharacter::tickUpdate() { H_AUTO(CharacterClearDeadTargetInfo); - // set TARGET HP, SAP and STAMINA in the database + // set TARGET ChaScore1, ChaScore3 and ChaScore2 in the database CEntityBase * target; if ( _Target.isReadable() ) { @@ -1169,19 +1169,19 @@ uint32 CCharacter::tickUpdate() setTarget( CEntityId::Unknown ); } // clear DB Bars -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.HP, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.SAP, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setSAP(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.STA, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setSTA(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.FOCUS, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setFOCUS(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore1, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore3, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore3(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore2, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore2(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore4, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore4(_PropertyDatabase, 0 ); } } } } - if( !checkCharacterStillValide(" Character corrupted : after update dead target (clear HP/STA/SAP) !!!") ) + if( !checkCharacterStillValide(" Character corrupted : after update dead target (clear ChaScore1/ChaScore2/ChaScore3) !!!") ) return (uint32)-1; } @@ -1195,57 +1195,57 @@ uint32 CCharacter::tickUpdate() // _PropertyDatabase.setProp( _DataIndexReminder->TARGET.UID, target->getEntityRowId().getCompressedIndex() ); CBankAccessor_PLR::getTARGET().getBARS().setUID(_PropertyDatabase, target->getEntityRowId().getCompressedIndex() ); - // Hp - if( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max <= 0 ) + // ChaScore1 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max <= 0 ) { percent = 0; } else { - percent = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max ) ); + percent = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max ) ); } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.HP, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore1, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(_PropertyDatabase, percent ); - // Sap - if( target->getPhysScores()._PhysicalScores[ SCORES::sap ].Max <= 0 ) + // ChaScore3 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max <= 0 ) { percent = 0; } else { - percent = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::sap ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::sap ].Max ) ); + percent = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max ) ); } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.SAP, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setSAP(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore3, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore3(_PropertyDatabase, percent ); - // Stamina - if( target->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max <= 0 ) + // ChaScore2 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max <= 0 ) { percent = 0; } else { - percent = sint8((127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::stamina ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max ) ); + percent = sint8((127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max ) ); } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.STA, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setSTA(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore2, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore2(_PropertyDatabase, percent ); - // Focus - if( target->getPhysScores()._PhysicalScores[ SCORES::focus ].Max <= 0 ) + // ChaScore4 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score4 ].Max <= 0 ) { percent = 0; } else { - sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::focus ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::focus ].Max ) ); + sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score4 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score4 ].Max ) ); if( percentTmp < 0 ) percent = 0; else percent = percentTmp; } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.FOCUS, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setFOCUS(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore4, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore4(_PropertyDatabase, percent ); // Set the level of the target (if player character) in database for ForceRegion/ForceLevel deduction if ( target->getId().getType() == RYZOMID::player ) @@ -1256,7 +1256,7 @@ uint32 CCharacter::tickUpdate() CBankAccessor_PLR::getTARGET().getBARS().setPLAYER_LEVEL(_PropertyDatabase, checkedCast(skillBaseValue) ); } - if( !checkCharacterStillValide(" Character corrupted : after update target HP/STA/SAP !!!") ) + if( !checkCharacterStillValide(" Character corrupted : after update target ChaScore1/ChaScore2/ChaScore3 !!!") ) return (uint32)-1; } } @@ -1278,22 +1278,22 @@ uint32 CCharacter::tickUpdate() if (team) { uint8 bar = uint8((_StatusBars & (0x000007ff)) >> 3); - if (_OldHpBarSentToTeam != bar) + if (_OldChaScore1BarSentToTeam != bar) { - team->updateCharacterScore(this, SCORES::hit_points, bar); - _OldHpBarSentToTeam = bar; + team->updateCharacterScore(this, SCORES::cha_score1, bar); + _OldChaScore1BarSentToTeam = bar; } bar = uint8( (_StatusBars & (0x0003f800)) >> 11); - if (_OldStaBarSentToTeam != bar) + if (_OldChaScore2BarSentToTeam != bar) { - team->updateCharacterScore(this, SCORES::stamina, bar); - _OldStaBarSentToTeam = bar; + team->updateCharacterScore(this, SCORES::cha_score2, bar); + _OldChaScore2BarSentToTeam = bar; } bar = uint8( (_StatusBars & (0x1fc0000)) >> 18); - if (_OldSapBarSentToTeam != bar) + if (_OldChaScore3BarSentToTeam != bar) { - team->updateCharacterScore(this, SCORES::sap, bar); - _OldSapBarSentToTeam = bar; + team->updateCharacterScore(this, SCORES::cha_score3, bar); + _OldChaScore3BarSentToTeam = bar; } if( !checkCharacterStillValide(" Character corrupted : after update team bars !!!") ) return (uint32)-1; @@ -1527,10 +1527,10 @@ uint32 CCharacter::tickUpdate() } uint32 nextUpdate = 16; - if( oldHp != _PhysScores._PhysicalScores[ SCORES::hit_points ].Current || - oldSta != _PhysScores._PhysicalScores[ SCORES::stamina].Current || - oldSap != _PhysScores._PhysicalScores[ SCORES::sap ].Current || - oldFocus != _PhysScores._PhysicalScores[ SCORES::focus].Current ) + if( oldChaScore1 != _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current || + oldChaScore2 != _PhysScores._PhysicalScores[ SCORES::cha_score2].Current || + oldChaScore3 != _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Current || + oldChaScore4 != _PhysScores._PhysicalScores[ SCORES::cha_score4].Current ) { nextUpdate = 8; } @@ -1602,7 +1602,7 @@ void CCharacter::kill(TDataSetRow killerRowId) removeAllSpells(); _ForbidPowerDates.clearConsumable(); - _PhysScores._PhysicalScores[SCORES::hit_points].Current = -_PhysScores._PhysicalScores[SCORES::hit_points].Max / 2; + _PhysScores._PhysicalScores[SCORES::cha_score1].Current = -_PhysScores._PhysicalScores[SCORES::cha_score1].Max / 2; setBars(); _TimeDeath = CTickEventHandler::getGameTime() + 5.0; @@ -1720,7 +1720,7 @@ void CCharacter::deathOccurs( void ) { H_AUTO(DeathOccursCharacter); - if( currentHp() > 0 ) + if( currentChaScore1() > 0 ) { resurrected(); return; @@ -1769,7 +1769,7 @@ void CCharacter::deathOccurs( void ) // negative regen giving healing times for resurrect character for( uint32 i = 0; i < SCORES::NUM_SCORES; ++i ) { - if( i == SCORES::hit_points ) + if( i == SCORES::cha_score1 ) { float currentRegen = - _PhysScores._PhysicalScores[ i ].Max / (CommaDelayBeforeDeath * 0.2f ); _PhysScores._PhysicalScores[ i ].CurrentRegenerate = currentRegen; @@ -1787,7 +1787,7 @@ void CCharacter::deathOccurs( void ) for( uint32 i = 0; i < SCORES::NUM_SCORES; ++i ) { sint32 oldCurrent = _PhysScores._PhysicalScores[ i ].Current; - if( i == SCORES::hit_points ) + if( i == SCORES::cha_score1 ) { if( _PhysScores._PhysicalScores[ i ].Current > - _PhysScores._PhysicalScores[ i ].Max ) { @@ -1905,10 +1905,10 @@ void CCharacter::applyRespawnEffects() _DeathPenalties->addDeath(*this, _NextDeathPenaltyFactor); resetNextDeathPenaltyFactor(); - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = _PhysScores._PhysicalScores[ SCORES::hit_points ].Base / 10; - _PhysScores._PhysicalScores[ SCORES::stamina ].Current = _PhysScores._PhysicalScores[ SCORES::stamina ].Base / 10; - _PhysScores._PhysicalScores[ SCORES::sap ].Current = _PhysScores._PhysicalScores[ SCORES::sap ].Base / 10; - _PhysScores._PhysicalScores[ SCORES::focus ].Current = _PhysScores._PhysicalScores[ SCORES::focus ].Base / 10; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base / 10; + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Base / 10; + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Base / 10; + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Base / 10; _Mode = MBEHAV::NORMAL; _Behaviour = MBEHAV::IDLE; _IsDead = false; @@ -1948,10 +1948,10 @@ void CCharacter::revive() _IsInAComa = false; _RegionKilledInPvp = 0xffff; - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = _PhysScores._PhysicalScores[ SCORES::hit_points ].Base; - _PhysScores._PhysicalScores[ SCORES::stamina ].Current = _PhysScores._PhysicalScores[ SCORES::stamina ].Base; - _PhysScores._PhysicalScores[ SCORES::sap ].Current = _PhysScores._PhysicalScores[ SCORES::sap ].Base; - _PhysScores._PhysicalScores[ SCORES::focus ].Current = _PhysScores._PhysicalScores[ SCORES::focus ].Base; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base; + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Base; + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Base; + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Base; } //--------------------------------------------------- @@ -2274,24 +2274,24 @@ void CCharacter::computeMaxValue() } switch( i ) { - case SCORES::hit_points: - _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::constitution ].Current + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor + _ScorePermanentModifiers[i]; - _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::metabolism ].Current / RegenDivisor;// + _PhysScores._PhysicalScores[ i ].RegenerateModifier; + case SCORES::cha_score1: + _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha1 ].Current + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor + _ScorePermanentModifiers[i]; + _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha1_reg ].Current / RegenDivisor;// + _PhysScores._PhysicalScores[ i ].RegenerateModifier; _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos / RegenReposFactor; break; - case SCORES::sap: - _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::intelligence ].Current + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor + _ScorePermanentModifiers[i]; - _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::wisdom ].Current / RegenDivisor;// + _PhysScores._PhysicalScores[ i ].RegenerateModifier; + case SCORES::cha_score2: + _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha2 ].Current + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor + _ScorePermanentModifiers[i]; + _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha2_reg ].Current / RegenDivisor;// + _PhysScores._PhysicalScores[ i ].RegenerateModifier; _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos / RegenReposFactor; break; - case SCORES::stamina: - _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::strength ].Current + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor + _ScorePermanentModifiers[i]; - _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::well_balanced ].Current / RegenDivisor;// + _PhysScores._PhysicalScores[ i ].RegenerateModifier; + case SCORES::cha_score3: + _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha3 ].Current + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor + _ScorePermanentModifiers[i]; + _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha3_reg ].Current / RegenDivisor;// + _PhysScores._PhysicalScores[ i ].RegenerateModifier; _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos / RegenReposFactor; break; - case SCORES::focus: - _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::dexterity ].Current + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor + _ScorePermanentModifiers[i]; - _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::will ].Current / RegenDivisor;// - _PhysScores._PhysicalScores[ i ].RegenerateModifier; + case SCORES::cha_score4: + _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha4 ].Current + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor + _ScorePermanentModifiers[i]; + _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha4_reg ].Current / RegenDivisor;// - _PhysScores._PhysicalScores[ i ].RegenerateModifier; _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos / RegenReposFactor; break; default:; @@ -2390,9 +2390,9 @@ void CCharacter::applyRegenAndClipCurrentValue() _PhysScores._PhysicalScores[ i ].Current = sint32(_PhysScores._PhysicalScores[ i ].Current + regenWholePart); _PhysScores._PhysicalScores[ i ].KeepRegenerateDecimal -= regenWholePart; - if (i == SCORES::hit_points) + if (i == SCORES::cha_score1) { - PROGRESSIONPVP::CCharacterProgressionPVP::getInstance()->playerRegenHP(this, regenWholePart); + PROGRESSIONPVP::CCharacterProgressionPVP::getInstance()->playerRegenChaScore1(this, regenWholePart); } } if( _PhysScores._PhysicalScores[ i ].Current > _PhysScores._PhysicalScores[ i ].Max ) @@ -3346,14 +3346,14 @@ void CCharacter::setTarget( const CEntityId &targetId, bool sendMessage ) // TODO: mission event? // _PropertyDatabase.setProp( _DataIndexReminder->TARGET.UID, CLFECOMMON::INVALID_CLIENT_DATASET_INDEX ); CBankAccessor_PLR::getTARGET().getBARS().setUID(_PropertyDatabase, CLFECOMMON::INVALID_CLIENT_DATASET_INDEX ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.HP, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.SAP, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setSAP(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.STA, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setSTA(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.FOCUS, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setFOCUS(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore1, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore2, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore2(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore3, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore3(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore4, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore4(_PropertyDatabase, 0 ); //_PropertyDatabase.setProp( "TARGET:AGGRESSIVE", 0 ); // _PropertyDatabase.setProp( "TARGET:FORCE_RATIO", 0 ); @@ -3367,7 +3367,7 @@ void CCharacter::setTarget( const CEntityId &targetId, bool sendMessage ) // reset combat event flags resetCombatEventFlags(); - // Get target, his Hp, and set TARGET HP in the database + // Get target, his ChaScore1, and set TARGET ChaSCore1 in the database target = CEntityBaseManager::getEntityBasePtr( _Target() ); if( target ) { @@ -3415,65 +3415,65 @@ void CCharacter::setTarget( const CEntityId &targetId, bool sendMessage ) CBankAccessor_PLR::getTARGET().getBARS().setUID(_PropertyDatabase, target->getEntityRowId().getCompressedIndex() ); sint8 percent; - // Hp - if( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max == 0 ) + // ChaScore1 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max == 0 ) { percent = 0; } else { - percent = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max ) ); + percent = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max ) ); } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.HP, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore1, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(_PropertyDatabase, percent ); - // Sap - if( target->getPhysScores()._PhysicalScores[ SCORES::sap ].Max == 0 ) + // ChaScore3 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max == 0 ) { percent = 0; } else { - sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::sap ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::sap ].Max ) ); + sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max ) ); if( percentTmp < 0 ) percent = 0; else percent = percentTmp; } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.SAP, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setSAP(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore3, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore3(_PropertyDatabase, percent ); - // Stamina - if( target->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max == 0 ) + // ChaScore2 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max == 0 ) { percent = 0; } else { - sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::stamina ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max ) ); + sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max ) ); if( percentTmp < 0 ) percent = 0; else percent = percentTmp; } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.STA, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setSTA(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore2, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore2(_PropertyDatabase, percent ); - // Focus - if( target->getPhysScores()._PhysicalScores[ SCORES::focus].Max == 0 ) + // ChaScore4 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score4].Max == 0 ) { percent = 0; } else { - sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::focus ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::focus ].Max ) ); + sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score4 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score4 ].Max ) ); if( percentTmp < 0 ) percent = 0; else percent = percentTmp; } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.FOCUS, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setFOCUS(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore4, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore4(_PropertyDatabase, percent ); // Validate properties of target CProperties prop; @@ -3528,14 +3528,14 @@ void CCharacter::setTarget( const CEntityId &targetId, bool sendMessage ) { // _PropertyDatabase.setProp( _DataIndexReminder->TARGET.UID, CLFECOMMON::INVALID_CLIENT_DATASET_INDEX ); CBankAccessor_PLR::getTARGET().getBARS().setUID(_PropertyDatabase, CLFECOMMON::INVALID_CLIENT_DATASET_INDEX ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.HP, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.SAP, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setSAP(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.STA, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setSTA(_PropertyDatabase, 0 ); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.FOCUS, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setFOCUS(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore1, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore2, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore2(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore3, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore3(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore4, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore4(_PropertyDatabase, 0 ); // PHRASE_UTILITIES::sendDynamicSystemMessage( _Id, "TARGET_NONE"); } @@ -4010,10 +4010,10 @@ void CCharacter::sendReservedTitleStatus(CHARACTER_TITLE::ECharacterTitle title, // // TARGET // { // nlverify( TARGET.UID = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:UID" ) ); -// nlverify( TARGET.HP = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:HP" ) ); -// nlverify( TARGET.SAP = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:SAP" ) ); -// nlverify( TARGET.STA = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:STA" ) ); -// nlverify( TARGET.FOCUS = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:FOCUS" ) ); +// nlverify( TARGET.ChaScore1 = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:ChaScore1" ) ); +// nlverify( TARGET.ChaScore2 = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:ChaScore2" ) ); +// nlverify( TARGET.ChaScore3 = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:ChaScore3" ) ); +// nlverify( TARGET.ChaScore4 = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:ChaScore4" ) ); // nlverify( TARGET.PLAYER_LEVEL = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:BARS:PLAYER_LEVEL" ) ); // nlverify( TARGET.CONTEXT_VAL = rootNode->getICDBStructNodeFromNameFromRoot( "TARGET:CONTEXT_VAL" ) ); // } @@ -5117,7 +5117,7 @@ void CCharacter::teleportCharacter( sint32 x, sint32 y, sint32 z, bool teleportW return; // Check if player is dying - if( currentHp() <= 0 ) + if( currentChaScore1() <= 0 ) { return; } @@ -5780,7 +5780,7 @@ void CCharacter::onAnimalSpawned( CPetSpawnConfirmationMsg::TSpawnError SpawnSta { c->setBehaviour( MBEHAV::DEATH, true ); //c->setMode( MBEHAV::DEATH ); => send Message to AIS - c->getScores()._PhysicalScores[SCORES::hit_points].Current = 0; + c->getScores()._PhysicalScores[SCORES::cha_score1].Current = 0; } } } @@ -6537,7 +6537,7 @@ void CCharacter::updateOnePetDatabase( uint petIndex, bool mustUpdateHungerDb ) { uint& i = petIndex; uint petType = 0; - sint8 pcHp = 0; + sint8 pcChaScore1 = 0; uint32 uid = CLFECOMMON::INVALID_CLIENT_DATASET_INDEX; uint64 pos = 0; uint32 bulkMax = 0; @@ -6615,8 +6615,8 @@ void CCharacter::updateOnePetDatabase( uint petIndex, bool mustUpdateHungerDb ) CCreature * c = CreatureManager.getCreature( TheDataset.getEntityId( _PlayerPets[ i ].SpawnedPets ) ); if( c ) { - pcHp = (sint8) ( ( 127.0 * c->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Current ) / c->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max ); - if( pcHp < 0 ) pcHp = 0; + pcChaScore1 = (sint8) ( ( 127.0 * c->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Current ) / c->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max ); + if( pcChaScore1 < 0 ) pcChaScore1 = 0; uid = c->getEntityRowId().getCompressedIndex(); pos = (((uint64)c->getState().X) << 32) + c->getState().Y; CVector2f animalPos; @@ -6640,8 +6640,8 @@ void CCharacter::updateOnePetDatabase( uint petIndex, bool mustUpdateHungerDb ) CBankAccessor_PLR::getPACK_ANIMAL().getBEAST(i).setUID(_PropertyDatabase, uid ); // _PropertyDatabase.setProp( _DataIndexReminder->PACK_ANIMAL.BEAST[i].STATUS, _PlayerPets[ i ].AnimalStatus ); CBankAccessor_PLR::getPACK_ANIMAL().getBEAST(i).setSTATUS(_PropertyDatabase, checkedCast(_PlayerPets[ i ].AnimalStatus) ); -// _PropertyDatabase.setProp( _DataIndexReminder->PACK_ANIMAL.BEAST[i].HP, pcHp ); - CBankAccessor_PLR::getPACK_ANIMAL().getBEAST(i).setHP(_PropertyDatabase, pcHp ); +// _PropertyDatabase.setProp( _DataIndexReminder->PACK_ANIMAL.BEAST[i].HP, pcChaScore1 ); + CBankAccessor_PLR::getPACK_ANIMAL().getBEAST(i).setHP(_PropertyDatabase, pcChaScore1 ); // _PropertyDatabase.setProp( _DataIndexReminder->PACK_ANIMAL.BEAST[i].BULK_MAX, bulkMax / 1000 ); CBankAccessor_PLR::getPACK_ANIMAL().getBEAST(i).setBULK_MAX(_PropertyDatabase, bulkMax / 1000 ); // _PropertyDatabase.setProp( _DataIndexReminder->PACK_ANIMAL.BEAST[i].POS, pos ); @@ -7367,10 +7367,10 @@ double CCharacter::addXpToSkillInternal( double XpGain, const std::string& ContS // EGSPD::skillProgessed(_Id, skillName, skill->Base); log_Character_LevelUp(_Id, skillName, skill->Base); // resplenish the enrgies as player gets a new level - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = _PhysScores._PhysicalScores[ SCORES::hit_points ].Max; - _PhysScores._PhysicalScores[ SCORES::stamina ].Current = _PhysScores._PhysicalScores[ SCORES::stamina ].Max; - _PhysScores._PhysicalScores[ SCORES::sap ].Current = _PhysScores._PhysicalScores[ SCORES::sap ].Max; - _PhysScores._PhysicalScores[ SCORES::focus ].Current = _PhysScores._PhysicalScores[ SCORES::focus ].Max; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Max; + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Max; + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Max; + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Max; } else { @@ -8205,17 +8205,17 @@ void CCharacter::setStartStatistics( const CCreateCharMsg& createCharMsg ) { switch( i ) { - case SCORES::hit_points: - _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::constitution ].Base + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor; + case SCORES::cha_score1: + _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha1 ].Base + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor; break; - case SCORES::sap: - _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::intelligence ].Base + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor; + case SCORES::cha_score2: + _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha2 ].Base + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor; break; - case SCORES::stamina: - _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::strength ].Base + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor; + case SCORES::cha_score3: + _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha3 ].Base + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor; break; - case SCORES::focus: - _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::dexterity ].Base + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor; + case SCORES::cha_score4: + _PhysScores._PhysicalScores[ i ].Base = (_PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha4 ].Base + PhysicalCharacteristicsBaseValue) * PhysicalCharacteristicsFactor; break; default:; } @@ -8821,7 +8821,7 @@ void CCharacter::updateRegen() { if( _IsInAComa || _IsDead ) { - if( i == SCORES::hit_points ) + if( i == SCORES::cha_score1 ) { float currentRegen = - _PhysScores._PhysicalScores[ i ].Max / 240.0f; //TODO make time to variable _PhysScores._PhysicalScores[ i ].CurrentRegenerate = currentRegen; @@ -8837,20 +8837,20 @@ void CCharacter::updateRegen() // normal regen switch( i ) { - case SCORES::hit_points: - _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::metabolism ].Base / RegenDivisor; + case SCORES::cha_score1: + _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha1_reg ].Base / RegenDivisor; _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos / RegenReposFactor; break; - case SCORES::sap: - _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::wisdom ].Base / RegenDivisor; + case SCORES::cha_score2: + _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha2_reg ].Base / RegenDivisor; _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos / RegenReposFactor; break; - case SCORES::stamina: - _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::well_balanced ].Base / RegenDivisor; + case SCORES::cha_score3: + _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha3_reg ].Base / RegenDivisor; _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos / RegenReposFactor; break; - case SCORES::focus: - _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::will ].Base / RegenDivisor; + case SCORES::cha_score4: + _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha4_reg ].Base / RegenDivisor; _PhysScores._PhysicalScores[ i ].BaseRegenerateAction = _PhysScores._PhysicalScores[ i ].BaseRegenerateRepos / RegenReposFactor; break; default:; @@ -9858,45 +9858,45 @@ void CCharacter::changeCharacteristic( CHARACTERISTICS::TCharacteristics charac, { // NB : do not need to update the client database, it will be done in the next call to applyRegenAndClipCurrentValue() // as we change base but not current (and so current will change and database will be updated) - case CHARACTERISTICS::constitution: - _PhysScores._PhysicalScores[ SCORES::hit_points ].Base += PhysicalCharacteristicsFactor * mod; + case CHARACTERISTICS::cha1: + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base += PhysicalCharacteristicsFactor * mod; break; - case CHARACTERISTICS::metabolism: - _PhysScores._PhysicalScores[ SCORES::hit_points ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[charac].Base / RegenDivisor; - _PhysScores._PhysicalScores[ SCORES::hit_points ].BaseRegenerateAction = _PhysScores._PhysicalScores[ SCORES::hit_points ].BaseRegenerateRepos / RegenReposFactor; + case CHARACTERISTICS::cha1_reg: + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[charac].Base / RegenDivisor; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].BaseRegenerateAction = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].BaseRegenerateRepos / RegenReposFactor; // add regen offset - _PhysScores._PhysicalScores[ SCORES::hit_points ].BaseRegenerateRepos += RegenOffset; - _PhysScores._PhysicalScores[ SCORES::hit_points ].BaseRegenerateAction += RegenOffset; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].BaseRegenerateRepos += RegenOffset; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].BaseRegenerateAction += RegenOffset; break; - case CHARACTERISTICS::intelligence: - _PhysScores._PhysicalScores[ SCORES::sap ].Base += PhysicalCharacteristicsFactor * mod; + case CHARACTERISTICS::cha3: + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Base += PhysicalCharacteristicsFactor * mod; break; - case CHARACTERISTICS::wisdom: - _PhysScores._PhysicalScores[ SCORES::sap].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[charac].Base / RegenDivisor; - _PhysScores._PhysicalScores[ SCORES::sap].BaseRegenerateAction = _PhysScores._PhysicalScores[ SCORES::sap].BaseRegenerateRepos / RegenReposFactor; + case CHARACTERISTICS::cha3_reg: + _PhysScores._PhysicalScores[ SCORES::cha_score3].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[charac].Base / RegenDivisor; + _PhysScores._PhysicalScores[ SCORES::cha_score3].BaseRegenerateAction = _PhysScores._PhysicalScores[ SCORES::cha_score3].BaseRegenerateRepos / RegenReposFactor; // add regen offset - _PhysScores._PhysicalScores[ SCORES::sap ].BaseRegenerateRepos += RegenOffset; - _PhysScores._PhysicalScores[ SCORES::sap ].BaseRegenerateAction += RegenOffset; + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].BaseRegenerateRepos += RegenOffset; + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].BaseRegenerateAction += RegenOffset; break; - case CHARACTERISTICS::strength: - _PhysScores._PhysicalScores[ SCORES::stamina ].Base += PhysicalCharacteristicsFactor * mod; + case CHARACTERISTICS::cha2: + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Base += PhysicalCharacteristicsFactor * mod; break; - case CHARACTERISTICS::well_balanced: - _PhysScores._PhysicalScores[ SCORES::stamina ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[charac].Base / RegenDivisor; - _PhysScores._PhysicalScores[ SCORES::stamina ].BaseRegenerateAction = _PhysScores._PhysicalScores[ SCORES::stamina ].BaseRegenerateRepos/ RegenReposFactor; + case CHARACTERISTICS::cha2_reg: + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[charac].Base / RegenDivisor; + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].BaseRegenerateAction = _PhysScores._PhysicalScores[ SCORES::cha_score2 ].BaseRegenerateRepos/ RegenReposFactor; // add regen offset - _PhysScores._PhysicalScores[ SCORES::stamina ].BaseRegenerateRepos += RegenOffset; - _PhysScores._PhysicalScores[ SCORES::stamina ].BaseRegenerateAction += RegenOffset; + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].BaseRegenerateRepos += RegenOffset; + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].BaseRegenerateAction += RegenOffset; break; - case CHARACTERISTICS::dexterity: - _PhysScores._PhysicalScores[ SCORES::focus ].Base += PhysicalCharacteristicsFactor * mod; + case CHARACTERISTICS::cha4: + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Base += PhysicalCharacteristicsFactor * mod; break; - case CHARACTERISTICS::will: - _PhysScores._PhysicalScores[ SCORES::focus ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[charac].Base / RegenDivisor; - _PhysScores._PhysicalScores[ SCORES::focus ].BaseRegenerateAction = _PhysScores._PhysicalScores[ SCORES::focus ].BaseRegenerateRepos / RegenReposFactor; + case CHARACTERISTICS::cha4_reg: + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].BaseRegenerateRepos = _PhysCharacs._PhysicalCharacteristics[charac].Base / RegenDivisor; + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].BaseRegenerateAction = _PhysScores._PhysicalScores[ SCORES::cha_score4 ].BaseRegenerateRepos / RegenReposFactor; // add regen offset - _PhysScores._PhysicalScores[ SCORES::focus ].BaseRegenerateRepos += RegenOffset; - _PhysScores._PhysicalScores[ SCORES::focus ].BaseRegenerateAction += RegenOffset; + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].BaseRegenerateRepos += RegenOffset; + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].BaseRegenerateAction += RegenOffset; break; default: break; @@ -11642,41 +11642,41 @@ void CCharacter::setBerserkFlag(bool isBerserk) { // YOYO: Berserk Flag since to be no more used. There is no more CHARACTER_INFO:SCORES:HitPoints database // hence must do it another way _PropertyDatabase.setProp( "CHARACTER_INFO:SCORES:HitPoints", 0); -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.HP, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore1, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(_PropertyDatabase, 0 ); } else { - //sint32 temp = lookupStat("CurrentHitPoints"); - // YOYO: Berserk Flag since to be no more used. There is no more CHARACTER_INFO:SCORES:HitPoints database - // hence must do it another way: _PropertyDatabase.setProp( "CHARACTER_INFO:SCORES:HitPoints", temp ); - sint32 temp = lookupStat("MaxHitPoints"); -// _PropertyDatabase.setProp( _DataIndexReminder->CHARACTER_INFO.SCORES.MaxScore[SCORES::hit_points], temp ); - CBankAccessor_PLR::getCHARACTER_INFO().getSCORES(SCORES::hit_points).setMax(_PropertyDatabase, temp ); + //sint32 temp = lookupStat("CurrentChaScore1"); + // YOYO: Berserk Flag since to be no more used. There is no more CHARACTER_INFO:SCORES:ChaScore1 database + // hence must do it another way: _PropertyDatabase.setProp( "CHARACTER_INFO:SCORES:ChaScore1", temp ); + sint32 temp = lookupStat("MaxChaScore1"); +// _PropertyDatabase.setProp( _DataIndexReminder->CHARACTER_INFO.SCORES.MaxScore[SCORES::cha_score1], temp ); + CBankAccessor_PLR::getCHARACTER_INFO().getSCORES(SCORES::cha_score1).setMax(_PropertyDatabase, temp ); CEntityBase* target = CEntityBaseManager::getEntityBasePtr( _Target() ); if( target ) { sint8 percent; - // Hp - if( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max <= 0 ) + // ChaScore1 + if( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max <= 0 ) { percent = 0; } else { - sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max ) ); + sint8 percentTmp = sint8( (127.0 * ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Current ) ) / ( target->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max ) ); if( percentTmp < 0 ) percent = 0; else percent = (uint8)percentTmp; } -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.HP, percent ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(_PropertyDatabase, percent ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore1, percent ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(_PropertyDatabase, percent ); } else -// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.HP, 0 ); - CBankAccessor_PLR::getTARGET().getBARS().setHP(_PropertyDatabase, 0 ); +// _PropertyDatabase.setProp( _DataIndexReminder->TARGET.ChaScore1, 0 ); + CBankAccessor_PLR::getTARGET().getBARS().setChaScore1(_PropertyDatabase, 0 ); } // _PropertyDatabase.setProp( "USER:BERSERK", _IsBerserk ); CBankAccessor_PLR::getUSER().setBERSERK(_PropertyDatabase, _IsBerserk ); @@ -13396,8 +13396,8 @@ void CCharacter::addLink( CSLinkEffect * effect) linkElem.setCOUNTER(_PropertyDatabase, (CBankAccessor_PLR::getEXECUTE_PHRASE().getLINK().getArray(0).getCOUNTER(_PropertyDatabase) + 1) &0xf ); // _PropertyDatabase.setProp( node, "PHRASE", effect->getPhraseBookIndex() ); linkElem.setPHRASE(_PropertyDatabase, effect->getPhraseBookIndex()); -// _PropertyDatabase.setProp( node, "SAP_COST", (sint16)effect->costPerUpdate() ); - linkElem.setSAP_COST(_PropertyDatabase, checkedCast(effect->costPerUpdate()) ); +// _PropertyDatabase.setProp( node, "ChaScore3_COST", (sint16)effect->costPerUpdate() ); + linkElem.setChaScore3_COST(_PropertyDatabase, checkedCast(effect->costPerUpdate()) ); // } } @@ -14759,8 +14759,8 @@ void CCharacter::beginOrResumeForageSession( const NLMISC::CSheetId& materialShe return; // Create progress structure (note: currently, the only forage tool stored is the one here, when creating the progress structure. Idem for usedSkill) - SCharacteristicsAndScores& focus = getScores()._PhysicalScores[SCORES::focus]; - _ForageProgress = new CForageProgress( materialSheetId, sourceRowId, usedSkill, focus.Current /*, forageToolUsed*/ ); + SCharacteristicsAndScores& ChaScore4 = getScores()._PhysicalScores[SCORES::cha_score4]; + _ForageProgress = new CForageProgress( materialSheetId, sourceRowId, usedSkill, ChaScore4.Current /*, forageToolUsed*/ ); resetProgress = true; } else @@ -14768,8 +14768,8 @@ void CCharacter::beginOrResumeForageSession( const NLMISC::CSheetId& materialShe if ( sourceRowId != _ForageProgress->sourceRowId() ) { // Reset progress - SCharacteristicsAndScores& focus = getScores()._PhysicalScores[SCORES::focus]; - _ForageProgress->reset( materialSheetId, sourceRowId, focus.Current ); + SCharacteristicsAndScores& ChaScore4 = getScores()._PhysicalScores[SCORES::cha_score4]; + _ForageProgress->reset( materialSheetId, sourceRowId, ChaScore4.Current ); resetProgress = true; } } @@ -16418,15 +16418,15 @@ SKILLS::ESkills CCharacter::getFirstUnlockedParentSkill(SKILLS::ESkills skill) c return skill; } -bool CCharacter::changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEntity) +bool CCharacter::changeCurrentChaScore1(sint32 deltaValue, TDataSetRow responsibleEntity) { - H_AUTO(CCharacter_changeCurrentHp); + H_AUTO(CCharacter_changeCurrentChaScore1); // test entity isn't dead already (unless it's a player in coma) if (isDead()) { - if ( deltaValue > 0 && _PhysScores._PhysicalScores[SCORES::hit_points].Current > (-_PhysScores._PhysicalScores[SCORES::hit_points].Max) ) + if ( deltaValue > 0 && _PhysScores._PhysicalScores[SCORES::cha_score1].Current > (-_PhysScores._PhysicalScores[SCORES::cha_score1].Max) ) { - // possible as a player in a 'coma' can still be healed (but not lose hp) + // possible as a player in a 'coma' can still be healed (but not lose ChaScore1) } else { @@ -16447,7 +16447,7 @@ bool CCharacter::changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEntit } } - _PhysScores._PhysicalScores[SCORES::hit_points].Current = _PhysScores._PhysicalScores[SCORES::hit_points].Current + deltaValue; + _PhysScores._PhysicalScores[SCORES::cha_score1].Current = _PhysScores._PhysicalScores[SCORES::cha_score1].Current + deltaValue; // if entity is mezzed and delta is != 0 unmezz it if (_MezzCount && deltaValue != 0) @@ -16455,7 +16455,7 @@ bool CCharacter::changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEntit unmezz(); } - if (_PhysScores._PhysicalScores[SCORES::hit_points].Current <= 0) + if (_PhysScores._PhysicalScores[SCORES::cha_score1].Current <= 0) { // for god mode if (!_GodMode && !_Invulnerable) @@ -16465,17 +16465,17 @@ bool CCharacter::changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEntit } else { - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = _PhysScores._PhysicalScores[ SCORES::hit_points ].Base; - setHpBar( 1023 ); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base; + setChaScore1Bar( 1023 ); return false; } } else { - if( _PhysScores._PhysicalScores[SCORES::hit_points].Max > 0) - setHpBar( (uint32) ( (1023 * _PhysScores._PhysicalScores[SCORES::hit_points].Current) / _PhysScores._PhysicalScores[SCORES::hit_points].Max) ); + if( _PhysScores._PhysicalScores[SCORES::cha_score1].Max > 0) + setChaScore1Bar( (uint32) ( (1023 * _PhysScores._PhysicalScores[SCORES::cha_score1].Current) / _PhysScores._PhysicalScores[SCORES::cha_score1].Max) ); else - setHpBar(0); + setChaScore1Bar(0); return false; } } @@ -16527,13 +16527,13 @@ void CCharacter::applyGooDamage( float gooDistance ) _LastTickSufferGooDamage = CTickEventHandler::getGameCycle(); // Apply damage corresponding to distance from goo if not dead - if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Current > 0 ) + if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current > 0 ) { - sint32 hpLost = (sint32)(_PhysScores._PhysicalScores[ SCORES::hit_points ].Base * damageRatio * MaxGooDamageRatio); - if (hpLost < 1) hpLost = 1; - if( hpLost > _PhysScores._PhysicalScores[ SCORES::hit_points ].Current ) + sint32 ChaScore1Lost = (sint32)(_PhysScores._PhysicalScores[ SCORES::cha_score1 ].Base * damageRatio * MaxGooDamageRatio); + if (ChaScore1Lost < 1) ChaScore1Lost = 1; + if( ChaScore1Lost > _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current ) { - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = 0; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = 0; // send message to player for inform is dead by goo or other if (_CurrentContinent == CONTINENT::FYROS) @@ -16547,7 +16547,7 @@ void CCharacter::applyGooDamage( float gooDistance ) } else { - _PhysScores._PhysicalScores[ SCORES::hit_points ].Current = _PhysScores._PhysicalScores[ SCORES::hit_points ].Current - hpLost; + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current = _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current - ChaScore1Lost; // send message to player for inform is suffer goo damage if (_CurrentContinent == CONTINENT::FYROS) sendDynamicSystemMessage(_EntityRowId, "SUFFER_FIRE_DAMAGE"); @@ -17096,25 +17096,25 @@ bool CCharacter::checkCharacterStillValide( const char * msgError) { if( i == 0 ) { - if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Current.testFlagInMirror() != 1 ) + if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current.testFlagInMirror() != 1 ) { - nlwarning("BUG: %s NASTY MEMORY BUG. current score %s ", _Id.toString().c_str(), SCORES::toString(SCORES::hit_points).c_str() ); + nlwarning("BUG: %s NASTY MEMORY BUG. current score %s ", _Id.toString().c_str(), SCORES::toString(SCORES::cha_score1).c_str() ); mirrorBoolCrushed = true; } - else if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Current.location().dataSet() == 0 ) + else if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current.location().dataSet() == 0 ) { - nlwarning("BUG: %s NASTY MEMORY BUG. current score %s don't have a dataset !", _Id.toString().c_str(), SCORES::toString(SCORES::hit_points).c_str() ); + nlwarning("BUG: %s NASTY MEMORY BUG. current score %s don't have a dataset !", _Id.toString().c_str(), SCORES::toString(SCORES::cha_score1).c_str() ); mirrorBoolCrushed = true; } - if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Max.testFlagInMirror() != 1 ) + if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Max.testFlagInMirror() != 1 ) { - nlwarning("BUG: %s NASTY MEMORY BUG. max score %s ", _Id.toString().c_str(), SCORES::toString(SCORES::hit_points).c_str() ); + nlwarning("BUG: %s NASTY MEMORY BUG. max score %s ", _Id.toString().c_str(), SCORES::toString(SCORES::cha_score1).c_str() ); mirrorBoolCrushed = true; } - else if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Max.location().dataSet() == 0 ) + else if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Max.location().dataSet() == 0 ) { - nlwarning("BUG: %s NASTY MEMORY BUG. max score %s don't have a dataset !", _Id.toString().c_str(), SCORES::toString(SCORES::hit_points).c_str() ); + nlwarning("BUG: %s NASTY MEMORY BUG. max score %s don't have a dataset !", _Id.toString().c_str(), SCORES::toString(SCORES::cha_score1).c_str() ); mirrorBoolCrushed = true; } } @@ -17253,10 +17253,10 @@ void CCharacter::checkCharacAndScoresValues() { H_AUTO(CheckScores); // Check Scores - checkScoresValues( SCORES::hit_points, CHARACTERISTICS::constitution ); - checkScoresValues( SCORES::sap, CHARACTERISTICS::intelligence ); - checkScoresValues( SCORES::stamina, CHARACTERISTICS::strength ); - checkScoresValues( SCORES::focus, CHARACTERISTICS::dexterity ); + checkScoresValues( SCORES::cha_score1, CHARACTERISTICS::cha1 ); + checkScoresValues( SCORES::cha_score3, CHARACTERISTICS::cha3 ); + checkScoresValues( SCORES::cha_score2, CHARACTERISTICS::cha2 ); + checkScoresValues( SCORES::cha_score4, CHARACTERISTICS::cha4 ); } } @@ -17539,7 +17539,7 @@ void CCharacter::logAndClearTempInventory() egs_chinfo("TEMP_INVENTORY_BUG : Color = %u, Protection : %s", craftParams->Color, BACK_COMPAT::OLD_PROTECTION_TYPE::toString(craftParams->Protection).c_str() ); // armor and jewel buff - egs_chinfo("TEMP_INVENTORY_BUG : HpBuff = %u, SapBuff = %u, StaBuff = %u, FocusBuff = %u", craftParams->HpBuff, craftParams->SapBuff, craftParams->StaBuff, craftParams->FocusBuff); + egs_chinfo("TEMP_INVENTORY_BUG : ChaScore1Buff = %u, ChaScore3Buff = %u, ChaScore2Buff = %u, ChaScore4Buff = %u", craftParams->ChaScore1Buff, craftParams->ChaScore3Buff, craftParams->ChaScore2Buff, craftParams->ChaScore4Buff); // destroy item tempInv->removeItem(i); @@ -18915,16 +18915,16 @@ void CCharacter::barUpdate() return; // if different from what sent to player - if( _PhysScores._PhysicalScores[ SCORES::hit_points ].Current() != _OldHpBarSentToPlayer || - _PhysScores._PhysicalScores[ SCORES::sap].Current() != _OldSapBarSentToPlayer || - _PhysScores._PhysicalScores[ SCORES::stamina].Current() != _OldStaBarSentToPlayer || - _PhysScores._PhysicalScores[ SCORES::focus].Current() != _OldFocusBarSentToPlayer ) + if( _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current() != _OldChaScore1BarSentToPlayer || + _PhysScores._PhysicalScores[ SCORES::cha_score2].Current() != _OldChaScore2BarSentToPlayer || + _PhysScores._PhysicalScores[ SCORES::cha_score3].Current() != _OldChaScore3BarSentToPlayer || + _PhysScores._PhysicalScores[ SCORES::cha_score4].Current() != _OldChaScore4BarSentToPlayer ) { // bkup cache - _OldHpBarSentToPlayer= _PhysScores._PhysicalScores[ SCORES::hit_points ].Current(); - _OldSapBarSentToPlayer= _PhysScores._PhysicalScores[ SCORES::sap].Current(); - _OldStaBarSentToPlayer= _PhysScores._PhysicalScores[ SCORES::stamina].Current(); - _OldFocusBarSentToPlayer= _PhysScores._PhysicalScores[ SCORES::focus].Current(); + _OldChaScore1BarSentToPlayer= _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Current(); + _OldChaScore2BarSentToPlayer= _PhysScores._PhysicalScores[ SCORES::cha_score2].Current(); + _OldChaScore3BarSentToPlayer= _PhysScores._PhysicalScores[ SCORES::cha_score3].Current(); + _OldChaScore4BarSentToPlayer= _PhysScores._PhysicalScores[ SCORES::cha_score4].Current(); // Since client must listen only the last message (no delta like DB here...), use a small counter _BarSentToPlayerMsgNumber++; @@ -18941,10 +18941,10 @@ void CCharacter::barUpdate() { // write the message bms.serial( _BarSentToPlayerMsgNumber ); - bms.serial( _OldHpBarSentToPlayer ); - bms.serial( _OldSapBarSentToPlayer ); - bms.serial( _OldStaBarSentToPlayer ); - bms.serial( _OldFocusBarSentToPlayer ); + bms.serial( _OldChaScore1BarSentToPlayer ); + bms.serial( _OldChaScore3BarSentToPlayer ); + bms.serial( _OldChaScore2BarSentToPlayer ); + bms.serial( _OldChaScore4BarSentToPlayer ); // send msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); CUnifiedNetwork::getInstance()->send( NLNET::TServiceId(_Id.getDynamicId()), msgout ); @@ -20279,7 +20279,7 @@ void CCharacter::disableEffectInDB(uint8 index, bool bonus, NLMISC::TGameCycle a sint32 CCharacter::getWeightMalus() { - sint32 maxWeight = BaseMaxCarriedWeight + 1000 * _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::strength ].Current; + sint32 maxWeight = BaseMaxCarriedWeight + 1000 * _PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha2 ].Current; sint32 weightDiff = ( maxWeight - sint32(getCarriedWeight()) ); sint32 weightMalus = weightDiff / 1000; if ( weightDiff % 1000 ) diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.h b/code/ryzom/server/src/entities_game_service/player_manager/character.h index b0067a5e0..f0b67cdf9 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.h @@ -2094,11 +2094,11 @@ public: SKILLS::ESkills getFirstUnlockedParentSkill(SKILLS::ESkills skill) const; /** - * change hp with a delta value - * \param deltaValue the delta value applied on hp + * change tra with a delta value + * \param deltaValue the delta value applied on tra * \return bool true if the entity died from the changement */ - virtual bool changeCurrentHp(sint32 deltaValue, TDataSetRow responsibleEntity = TDataSetRow()); + virtual bool changeCurrentChaScore1(sint32 deltaValue, TDataSetRow responsibleEntity = TDataSetRow()); // aggroable mode void setAggroable(bool aggroable, bool forceUpdate = false); @@ -2251,7 +2251,7 @@ public: /// database update, called every 2 tick, send delta to the clients void databaseUpdate(); - /// HP/STA/SAP/FOCUS bar update, called every 2 tick, send fast-accurate bar info to the client + /// ChaScore1/ChaScore2/ChaScore3/ChaScore4 bar update, called every 2 tick, send fast-accurate bar info to the client void barUpdate(); CCharacterEncyclopedia &getEncyclopedia(); @@ -3025,7 +3025,7 @@ public: private: R2::TUserRole _SessionUserRole; - sint32 _HPB; //backup hp of player for mainland, for be independant of what happend in ring session + sint32 _ChaScore1B; //backup ChaScore1 of player for mainland, for be independant of what happend in ring session // If SessionLockPositionStack, the current position won't be saved (ex: _SessionUserRole == ur_editor) TSessionId _SessionId; @@ -3104,17 +3104,17 @@ private: TChanID _LeagueId; /// temp values used to test if team bars need an update or not - mutable uint8 _OldHpBarSentToTeam; - mutable uint8 _OldSapBarSentToTeam; - mutable uint8 _OldStaBarSentToTeam; + mutable uint8 _OldChaScore1BarSentToTeam; + mutable uint8 _OldChaScore3BarSentToTeam; + mutable uint8 _OldChaScore2BarSentToTeam; /// temp values used to test if Players bars need an update or not uint8 _BarSentToPlayerMsgNumber; - sint32 _OldHpBarSentToPlayer; - sint32 _OldSapBarSentToPlayer; - sint32 _OldStaBarSentToPlayer; - sint32 _OldFocusBarSentToPlayer; + sint32 _OldChaScore1BarSentToPlayer; + sint32 _OldChaScore3BarSentToPlayer; + sint32 _OldChaScore2BarSentToPlayer; + sint32 _OldChaScore4BarSentToPlayer; NLMISC::TGameCycle _LastTickSaved; NLMISC::TGameCycle _LastTickCompassUpdated; @@ -3678,10 +3678,10 @@ private: // struct CTarget // { // TDbReminderData UID; -// TDbReminderData HP; -// TDbReminderData SAP; -// TDbReminderData STA; -// TDbReminderData FOCUS; +// TDbReminderData ChaScore1; +// TDbReminderData ChaScore3; +// TDbReminderData ChaScore2; +// TDbReminderData ChaScore4; // TDbReminderData CONTEXT_VAL; // TDbReminderData PLAYER_LEVEL; // }; diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp index 954037b56..c25e63433 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp @@ -89,7 +89,7 @@ extern CGenericXmlMsgHeaderManager GenericMsgManager; extern float MaxHarvestDistance; extern SKILLS::ESkills BarehandCombatSkill; -CVariable DefaultWeightHands("egs", "DefaultWeightHands", "Weight of hands for calculate STA consumed by action for handed fight", 500,0,true); +CVariable DefaultWeightHands("egs", "DefaultWeightHands", "Weight of hands for calculate ChaScore2 consumed by action for handed fight", 500,0,true); // **************************************************************************** void CCharacter::initInventories() @@ -307,7 +307,7 @@ void CCharacter::itemPickup( const NLMISC::CEntityId& entity, bool harvest ) } // check creature is dead - if (creature->getScores()._PhysicalScores[SCORES::hit_points].Current > 0 ) + if (creature->getScores()._PhysicalScores[SCORES::cha_score1].Current > 0 ) { nlwarning(" Creature %s isn't dead, cancel", entity.toString().c_str() ); sendCloseTempInventoryImpulsion(); @@ -2441,10 +2441,10 @@ void CCharacter::sendItemInfos( uint16 slotId ) infos.JungleMagicResistance = item->magicResistance(RESISTANCE_TYPE::Jungle); infos.PrimaryRootMagicResistance = item->magicResistance(RESISTANCE_TYPE::PrimaryRoot); - infos.HpBuff = item->hpBuff(); - infos.SapBuff = item->sapBuff(); - infos.StaBuff = item->staBuff(); - infos.FocusBuff = item->focusBuff(); + infos.ChaScore1Buff = item->ChaScore1Buff(); + infos.ChaScore2Buff = item->ChaScore2Buff(); + infos.ChaScore3Buff = item->ChaScore3Buff(); + infos.ChaScore4Buff = item->ChaScore4Buff(); infos.Enchantment.Bricks = item->getEnchantment(); infos.CastingSpeedFactor[CItemInfos::OffensiveElemental] = item->getElementalCastingTimeFactor(); @@ -3178,10 +3178,10 @@ void CCharacter::applyItemModifiers(const CGameItemPtr &item) CBankAccessor_PLR::getCHARACTER_INFO().getPARRY().setCurrent(_PropertyDatabase, checkedCast(_CurrentParryLevel) ); // modifiers on scores - _PhysScores._PhysicalScores[ SCORES::hit_points ].Modifier += (item->hpBuff() + item->armorHpBuff()); - _PhysScores._PhysicalScores[ SCORES::stamina ].Modifier += item->staBuff(); - _PhysScores._PhysicalScores[ SCORES::sap ].Modifier += item->sapBuff(); - _PhysScores._PhysicalScores[ SCORES::focus ].Modifier += item->focusBuff(); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Modifier += (item->ChaScore1Buff() + item->armorChaScore1Buff()); + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Modifier += item->ChaScore2Buff(); + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Modifier += item->ChaScore3Buff(); + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Modifier += item->ChaScore4Buff(); // specific modifiers if ( !item->getTypeSkillMods().empty() ) @@ -3223,10 +3223,10 @@ void CCharacter::removeItemModifiers(const CGameItemPtr &item) CBankAccessor_PLR::getCHARACTER_INFO().getPARRY().setCurrent(_PropertyDatabase, checkedCast(_CurrentParryLevel) ); // modifiers on scores - _PhysScores._PhysicalScores[ SCORES::hit_points ].Modifier -= (item->hpBuff() + item->armorHpBuff()); - _PhysScores._PhysicalScores[ SCORES::stamina ].Modifier -= item->staBuff(); - _PhysScores._PhysicalScores[ SCORES::sap ].Modifier -= item->sapBuff(); - _PhysScores._PhysicalScores[ SCORES::focus ].Modifier -= item->focusBuff(); + _PhysScores._PhysicalScores[ SCORES::cha_score1 ].Modifier -= (item->ChaScore1Buff() + item->armorChaScore1Buff()); + _PhysScores._PhysicalScores[ SCORES::cha_score2 ].Modifier -= item->ChaScore2Buff(); + _PhysScores._PhysicalScores[ SCORES::cha_score3 ].Modifier -= item->ChaScore3Buff(); + _PhysScores._PhysicalScores[ SCORES::cha_score4 ].Modifier -= item->ChaScore4Buff(); // specific modifiers if ( !item->getTypeSkillMods().empty() ) diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_tick_update_timer_event.h b/code/ryzom/server/src/entities_game_service/player_manager/character_tick_update_timer_event.h index cad26ed04..8980c20d1 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_tick_update_timer_event.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/character_tick_update_timer_event.h @@ -51,7 +51,7 @@ private: }; // *************************************************************************** -// frequent update of the player HP/STA/SAP/FOCUS bars +// frequent update of the player ChaScore1/ChaScore2/ChaScore3/ChaScore4 bars class CCharacterBarUpdateTimerEvent : public CTimerEvent { NL_INSTANCE_COUNTER_DECL(CCharacterBarUpdateTimerEvent); diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp index a497e225e..49998a499 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp @@ -205,17 +205,17 @@ void CCharacterVersionAdapter::adaptToVersion2(CCharacter &character) const { switch( i ) { - case SCORES::hit_points: - character._PhysScores._PhysicalScores[ i ].Base = character._PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::constitution ].Base * 10; + case SCORES::cha_score1: + character._PhysScores._PhysicalScores[ i ].Base = character._PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha1 ].Base * 10; break; - case SCORES::sap: - character._PhysScores._PhysicalScores[ i ].Base = character._PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::intelligence ].Base * 10; + case SCORES::cha_score2: + character._PhysScores._PhysicalScores[ i ].Base = character._PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha2 ].Base * 10; break; - case SCORES::stamina: - character._PhysScores._PhysicalScores[ i ].Base = character._PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::strength ].Base * 10; + case SCORES::cha_score3: + character._PhysScores._PhysicalScores[ i ].Base = character._PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha3 ].Base * 10; break; - case SCORES::focus: - character._PhysScores._PhysicalScores[ i ].Base = character._PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::dexterity ].Base * 10; + case SCORES::cha_score4: + character._PhysScores._PhysicalScores[ i ].Base = character._PhysCharacs._PhysicalCharacteristics[ CHARACTERISTICS::cha4 ].Base * 10; break; default:; } @@ -1065,19 +1065,19 @@ void CCharacterVersionAdapter::adaptToVersion23(CCharacter &character) const //--------------------------------------------------- void CCharacterVersionAdapter::adaptToVersion24(CCharacter &character) const { - // HP + // ChaScore1 uint32 bonus; vector bricks; - bricks.push_back("bthp01"); - bricks.push_back("bthp04"); - bricks.push_back("bthp06"); - bricks.push_back("bthp08"); - bricks.push_back("bthp12"); - bricks.push_back("bthp13"); - bricks.push_back("bthp16"); - bricks.push_back("bthp17"); - bricks.push_back("bthp18"); - bricks.push_back("bthp20"); + bricks.push_back("btchs101"); + bricks.push_back("btchs104"); + bricks.push_back("btchs106"); + bricks.push_back("btchs108"); + bricks.push_back("btchs112"); + bricks.push_back("btchs113"); + bricks.push_back("btchs116"); + bricks.push_back("btchs117"); + bricks.push_back("btchs118"); + bricks.push_back("btchs120"); bonus = 0; for (uint i = 0; i < bricks.size(); i++) @@ -1089,19 +1089,19 @@ void CCharacterVersionAdapter::adaptToVersion24(CCharacter &character) const } } - if (character.getScorePermanentModifiers(SCORES::hit_points) < bonus) + if (character.getScorePermanentModifiers(SCORES::cha_score1) < bonus) { - nlinfo("RITE BONUS FIX: Player %s need %d (hp) but have %d !", character.getName().toString().c_str(), bonus, character.getScorePermanentModifiers(SCORES::hit_points)); - character.setScorePermanentModifiers(SCORES::hit_points, bonus); + nlinfo("RITE BONUS FIX: Player %s need %d (ChaScore1) but have %d !", character.getName().toString().c_str(), bonus, character.getScorePermanentModifiers(SCORES::cha_score1)); + character.setScorePermanentModifiers(SCORES::cha_score1, bonus); } - // SAP + // ChaScore3 bricks.clear(); - bricks.push_back("btsap03"); - bricks.push_back("btsap04"); - bricks.push_back("btsap12"); - bricks.push_back("btsap16"); - bricks.push_back("btsap18"); + bricks.push_back("btchs303"); + bricks.push_back("btchs304"); + bricks.push_back("btchs312"); + bricks.push_back("btchs316"); + bricks.push_back("btchs318"); bonus = 0; for (uint i = 0; i < bricks.size(); i++) @@ -1113,22 +1113,22 @@ void CCharacterVersionAdapter::adaptToVersion24(CCharacter &character) const } } - if (character.getScorePermanentModifiers(SCORES::sap) < bonus) + if (character.getScorePermanentModifiers(SCORES::cha_score3) < bonus) { - nlinfo("RITE BONUS FIX: Player %s need %d (sap) but have %d !", character.getName().toString().c_str(),bonus, character.getScorePermanentModifiers(SCORES::sap)); - character.setScorePermanentModifiers(SCORES::sap, bonus); + nlinfo("RITE BONUS FIX: Player %s need %d (ChaScore3) but have %d !", character.getName().toString().c_str(),bonus, character.getScorePermanentModifiers(SCORES::cha_score3)); + character.setScorePermanentModifiers(SCORES::cha_score3, bonus); } - // FOCUS + // ChaScore3 bricks.clear(); - bricks.push_back("btfoc01"); - bricks.push_back("btfoc04"); - bricks.push_back("btfoc09"); - bricks.push_back("btfoc11"); - bricks.push_back("btfoc15"); - bricks.push_back("btfoc17"); - bricks.push_back("btfoc19"); - bricks.push_back("btfoc20"); + bricks.push_back("btchs401"); + bricks.push_back("btchs404"); + bricks.push_back("btchs409"); + bricks.push_back("btchs411"); + bricks.push_back("btchs415"); + bricks.push_back("btchs417"); + bricks.push_back("btchs419"); + bricks.push_back("btchs420"); bonus = 0; for (uint i = 0; i < bricks.size(); i++) @@ -1140,20 +1140,20 @@ void CCharacterVersionAdapter::adaptToVersion24(CCharacter &character) const } } - if (character.getScorePermanentModifiers(SCORES::focus) < bonus) + if (character.getScorePermanentModifiers(SCORES::cha_score4) < bonus) { - nlinfo("RITE BONUS FIX: Player %s need %d (focus) but have %d !", character.getName().toString().c_str(),bonus, character.getScorePermanentModifiers(SCORES::focus)); - character.setScorePermanentModifiers(SCORES::focus, bonus); + nlinfo("RITE BONUS FIX: Player %s need %d (ChaScore4) but have %d !", character.getName().toString().c_str(),bonus, character.getScorePermanentModifiers(SCORES::cha_score4)); + character.setScorePermanentModifiers(SCORES::cha_score4, bonus); } - // STA + // ChaScore2 bricks.clear(); - bricks.push_back("btsta13"); - bricks.push_back("btsta14"); - bricks.push_back("btsta15"); - bricks.push_back("btsta16"); - bricks.push_back("btsta17"); - bricks.push_back("btsta20"); + bricks.push_back("btchs13"); + bricks.push_back("btchs14"); + bricks.push_back("btchs15"); + bricks.push_back("btchs16"); + bricks.push_back("btchs17"); + bricks.push_back("btchs20"); bonus = 0; for (uint i = 0; i < bricks.size(); i++) @@ -1165,10 +1165,10 @@ void CCharacterVersionAdapter::adaptToVersion24(CCharacter &character) const } } - if (character.getScorePermanentModifiers(SCORES::stamina) < bonus) + if (character.getScorePermanentModifiers(SCORES::cha_score2) < bonus) { - nlinfo("RITE BONUS FIX: Player %s need %d (stamina) but have %d !", character.getName().toString().c_str(),bonus, character.getScorePermanentModifiers(SCORES::stamina)); - character.setScorePermanentModifiers(SCORES::stamina, bonus); + nlinfo("RITE BONUS FIX: Player %s need %d (ChaScore1) but have %d !", character.getName().toString().c_str(),bonus, character.getScorePermanentModifiers(SCORES::cha_score2)); + character.setScorePermanentModifiers(SCORES::cha_score2, bonus); } } diff --git a/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp b/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp index 576819fcc..0108af6f8 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/persistent_player_data.cpp @@ -341,12 +341,12 @@ static void prepareCharacterPositionForStore ( COfflineEntityState & state, cons PositionStack.topToModify() = farPosToSave;\ }\ } \ - sint32 hp = _PhysScores._PhysicalScores[SCORES::hit_points].Current;\ - if (IsRingShard) { const_cast(this)->_PhysScores._PhysicalScores[SCORES::hit_points].Current = std::max(hp,sint32(1)); }\ - if (!IsRingShard) { const_cast(this)->_HPB = _PhysScores._PhysicalScores[SCORES::hit_points].Current; }\ + sint32 ChaScore1 = _PhysScores._PhysicalScores[SCORES::cha_score1].Current;\ + if (IsRingShard) { const_cast(this)->_PhysScores._PhysicalScores[SCORES::cha_score1].Current = std::max(ChaScore1,sint32(1)); }\ + if (!IsRingShard) { const_cast(this)->_ChaScore1B = _PhysScores._PhysicalScores[SCORES::cha_score1].Current; }\ #define PERSISTENT_POST_STORE\ - if (IsRingShard) { const_cast(this)->_PhysScores._PhysicalScores[SCORES::hit_points].Current = hp; }\ + if (IsRingShard) { const_cast(this)->_PhysScores._PhysicalScores[SCORES::cha_score1].Current = ChaScore1; }\ // Sidenote: @@ -369,7 +369,7 @@ static void prepareCharacterPositionForStore ( COfflineEntityState & state, cons H_AUTO(CCharacterApply);\ uint32 version=~0u;\ prepareToLoad();\ - _HPB= 0x12345678; \ + _ChaScore1B= 0x12345678; \ #define PERSISTENT_POST_APPLY\ if (version!=~0u)\ @@ -389,7 +389,7 @@ static void prepareCharacterPositionForStore ( COfflineEntityState & state, cons }\ \ postLoadTreatment();\ - if(!IsRingShard && _HPB!=0x12345678) { _PhysScores._PhysicalScores[SCORES::hit_points].Current = _HPB; }\ + if(!IsRingShard && _ChaScore1B!=0x12345678) { _PhysScores._PhysicalScores[SCORES::cha_score1].Current = _ChaScore1B; }\ #define PERSISTENT_DATA\ FLAG(CLEAR,clear())\ @@ -405,8 +405,8 @@ static void prepareCharacterPositionForStore ( COfflineEntityState & state, cons PROP(uint8, _HandsColor)\ PROP(uint64,_Money)\ \ - /* property for backup character HP independently of what happened in ring session*/\ - PROP(sint32,_HPB)\ + /* property for backup character ChaScore1 independently of what happened in ring session*/\ + PROP(sint32,_ChaScore1B)\ \ LPROP_MAP2(FactionPoints, string, uint32,\ for(uint32 i = 0; i < (PVP_CLAN::EndClans-PVP_CLAN::BeginClans+1); ++i),\ @@ -1336,7 +1336,7 @@ private: /* PROP2(_LocSlot, uint32, _InventorySlot, _InventorySlot=val)*/\ PROP2(_LocSlot, uint32, _InventorySlot, applyArgs.InventorySlot=val)\ /*PROP2(_ClientInventoryPosition, sint16, _ClientInventoryPosition, _ClientInventoryPosition=val)*/\ - PROP2(_HP, uint32, _HP, _HP=val)\ + PROP2(_HP, uint32, _HP, _HP=val) \ PROP2(_Recommended, uint32, _Recommended, _Recommended=val)\ PROP2(_CreatorId, CEntityId, _CreatorId, _CreatorId=val)\ PROP2(_PhraseId, string, _PhraseId, _PhraseId=val)\ @@ -1399,10 +1399,10 @@ private: LPROP(float,MaxBluntProtection,if (MaxBluntProtection!=0.0f))\ LPROP(float,MaxPiercingProtection,if (MaxPiercingProtection!=0.0f))\ LPROP(uint8,Color,if (Color!=1))\ - LPROP(sint32,HpBuff,if (HpBuff!=0))\ - LPROP(sint32,SapBuff,if (SapBuff!=0))\ - LPROP(sint32,StaBuff,if (StaBuff!=0))\ - LPROP(sint32,FocusBuff,if (FocusBuff!=0))\ + LPROP(sint32,ChaScore1Buff,if (ChaScore1Buff!=0))\ + LPROP(sint32,ChaScore3Buff,if (ChaScore3Buff!=0))\ + LPROP(sint32,ChaScore2Buff,if (ChaScore2Buff!=0))\ + LPROP(sint32,ChaScore4Buff,if (ChaScore4Buff!=0)) \ LPROP(float,ElementalCastingTimeFactor,if (ElementalCastingTimeFactor!=0.0f))\ LPROP(float,ElementalPowerFactor,if (ElementalPowerFactor!=0.0f))\ LPROP(float,OffensiveAfflictionCastingTimeFactor,if (OffensiveAfflictionCastingTimeFactor!=0.0f))\ diff --git a/code/ryzom/server/src/entities_game_service/progression/progression_common.h b/code/ryzom/server/src/entities_game_service/progression/progression_common.h index 575835621..fb53c2b5c 100644 --- a/code/ryzom/server/src/entities_game_service/progression/progression_common.h +++ b/code/ryzom/server/src/entities_game_service/progression/progression_common.h @@ -41,10 +41,10 @@ struct TReportAction SKILLS::ESkills Skill; // Skill used by actor (useful only if PJ is actor), if unknown no xp will be gained uint16 SkillLevel; // if not zero, use this value as the skill level instead of the real player skill level (needed for the enchantment special case) float factor; // for gain a part of xp due to a partial success action performed [ 0... 1.2 (for critical) ] - uint32 Hp; // > 0 due to attack suffer (PNJ attack) or adding by curative action - uint32 Sta; // > 0 reduce due to attack suffer (PNJ attack) or adding by curative action - uint32 Sap; // > 0 reduce due to attack suffer (PNJ attack) or adding by curative action - uint32 Focus; // > 0 reduce due to attack suffer (PNJ attack) or adding by curative action + uint32 ChaScore1; // > 0 due to attack suffer (PNJ attack) or adding by curative action + uint32 ChaScore2; // > 0 reduce due to attack suffer (PNJ attack) or adding by curative action + uint32 ChaScore3; // > 0 reduce due to attack suffer (PNJ attack) or adding by curative action + uint32 ChaScore4; // > 0 reduce due to attack suffer (PNJ attack) or adding by curative action TReportAction() { @@ -55,10 +55,10 @@ struct TReportAction Skill = SKILLS::unknown; SkillLevel = 0; factor = 1.0f; - Hp = 0; - Sta = 0; - Sap = 0; - Focus = 0; + ChaScore1 = 0; + ChaScore2 = 0; + ChaScore3 = 0; + ChaScore4 = 0; } }; diff --git a/code/ryzom/server/src/entities_game_service/progression/progression_pve.cpp b/code/ryzom/server/src/entities_game_service/progression/progression_pve.cpp index ed3c03c8e..e3b64428a 100644 --- a/code/ryzom/server/src/entities_game_service/progression/progression_pve.cpp +++ b/code/ryzom/server/src/entities_game_service/progression/progression_pve.cpp @@ -144,9 +144,9 @@ void CCharacterProgressionPVE::actionReport( TReportAction& reportAction, bool i CEntityBase * target = CEntityBaseManager::getEntityBasePtr( reportAction.TargetRowId ); // memorize damage - if (target && reportAction.Hp > 0) + if (target && reportAction.ChaScore1 > 0) { - addDamage(actor->getId(), target->getId(), reportAction.Hp); + addDamage(actor->getId(), target->getId(), reportAction.ChaScore1); } // used skill will be considered for delta level of the action during a combat @@ -167,7 +167,7 @@ void CCharacterProgressionPVE::actionReport( TReportAction& reportAction, bool i case ACTNATURE::FIGHT: // if no damage done on a fight action, do not consider it, juste returns - if (reportAction.Hp == 0) + if (reportAction.ChaScore1 == 0) { return; } @@ -192,7 +192,7 @@ void CCharacterProgressionPVE::actionReport( TReportAction& reportAction, bool i if (useSkillForDeltaLevel) { // if no damage reported yet, report it now to add target creature as team ennemy - if (reportAction.Hp == 0) + if (reportAction.ChaScore1 == 0) addDamage(actor->getId(), target->getId(), 0); uint16 skillValue = (uint16)playerChar->getSkillBaseValue(reportAction.Skill); @@ -592,7 +592,7 @@ void CCharacterProgressionPVE::offensiveActionReported( const TReportAction& rep } // PJ perform offensive action against PNJ -// crea->getCreatureOpponent().storeAggressor( reportAction.ActorRowId, reportAction.Hp ); +// crea->getCreatureOpponent().storeAggressor( reportAction.ActorRowId, reportAction.ChaScore1 ); TCharacterActionsContainer::iterator it = _CharacterActions.find( reportAction.ActorRowId ); if( it == _CharacterActions.end() ) { @@ -633,7 +633,7 @@ void CCharacterProgressionPVE::offensiveActionReported( const TReportAction& rep CCreature * crea = dynamic_cast< CCreature * >( target ); if( crea != 0 ) { - crea->getCreatureOpponent().storeAggressor( reportAction.ActorRowId, reportAction.Hp ); + crea->getCreatureOpponent().storeAggressor( reportAction.ActorRowId, reportAction.ChaScore1 ); } } */ @@ -1678,14 +1678,14 @@ void CCharacterProgressionPVE::removeCreature(TDataSetRow creature) //---------------------------------------------------------------------------- // CCharacterProgressionPVE::removeCreature //---------------------------------------------------------------------------- -void CCharacterProgressionPVE::applyRegenHP(TDataSetRow creature, sint32 regenHP) +void CCharacterProgressionPVE::applyRegenChaScore1(TDataSetRow creature, sint32 regenChaScore1) { // get damage inflicted on creature TCreatureTakenDamageContainer::iterator itCreatureDamage = _CreatureTakenDamage.find(creature); if (itCreatureDamage == _CreatureTakenDamage.end()) return; - (*itCreatureDamage).second.applyRegenHP(regenHP); + (*itCreatureDamage).second.applyRegenChaScore1(regenChaScore1); } //---------------------------------------------------------------------------- @@ -1884,31 +1884,31 @@ void CCharacterActions::addAction( const TDataSetRow& target, SKILLS::ESkills sk /*void CCharacterActions::addCurativeAction( const TReportAction& reportAction ) { // no xp gain if curative action restore no energy - /*if( reportAction.Hp + reportAction.Sap + reportAction.Sta + reportAction.Focus == 0 ) + /*if( reportAction.ChaScore1 + reportAction.ChaScore3 + reportAction.ChaScore2 + reportAction.ChaScore4 == 0 ) return 0; - uint32 TotalHpDmg = 0; - uint32 TotalSapDmg = 0; - uint32 TotalStaDmg = 0; - uint32 TotalFocusDmg = 0; + uint32 TotalChaScore1Dmg = 0; + uint32 TotalChaScore3Dmg = 0; + uint32 TotalChaScore2Dmg = 0; + uint32 TotalChaSCore4Dmg = 0; - double xpGainForHpRestore = 0.0f; - double xpGainForSapRestore = 0.0f; - double xpGainForStaRestore = 0.0f; - double xpGainForFocusRestore = 0.0f; + double xpGainForChaScore1Restore = 0.0f; + double xpGainForChaScore3Restore = 0.0f; + double xpGainForChaScore2Restore = 0.0f; + double xpGainForChaScore4Restore = 0.0f; for( TSkillProgressPerOpponentContainer::iterator it = _SkillProgressPerOpponent.begin(); it != _SkillProgressPerOpponent.end(); ++it ) { - TotalHpDmg += (*it).second->hp(); - TotalSapDmg += (*it).second->sap(); - TotalStaDmg += (*it).second->sta(); - TotalFocusDmg += (*it).second->focus(); + TotalChaScore1Dmg += (*it).second->ChaScore1(); + TotalChaScore3Dmg += (*it).second->ChaScore3(); + TotalChaScore2Dmg += (*it).second->ChaScore2(); + TotalChaScore4Dmg += (*it).second->ChaScore4(); } - xpGainForHpRestore = xpGain * reportAction.Hp / ( reportAction.Hp + reportAction.Sap + reportAction.Sta + reportAction.Focus ); - xpGainForSapRestore = xpGain * reportAction.Sap / ( reportAction.Hp + reportAction.Sap + reportAction.Sta + reportAction.Focus ); - xpGainForStaRestore = xpGain * reportAction.Sta / ( reportAction.Hp + reportAction.Sap + reportAction.Sta + reportAction.Focus ); - xpGainForFocusRestore = xpGain * reportAction.Focus / ( reportAction.Hp + reportAction.Sap + reportAction.Sta + reportAction.Focus ); + xpGainForChaScore1Restore = xpGain * reportAction.ChaScore1 / ( reportAction.ChaScore1 + reportAction.ChaScore3 + reportAction.ChaScore2 + reportAction.ChaScore4 ); + xpGainForChaScore3Restore = xpGain * reportAction.ChaScore3 / ( reportAction.ChaScore1 + reportAction.ChaScore3 + reportAction.ChaScore2 + reportAction.ChaScore4 ); + xpGainForChaScore2Restore = xpGain * reportAction.ChaScore2 / ( reportAction.ChaScore1 + reportAction.ChaScore3 + reportAction.ChaScore2 + reportAction.ChaScore4 ); + xpGainForChaScore4Restore = xpGain * reportAction.ChaScore4 / ( reportAction.ChaScore1 + reportAction.ChaScore3 + reportAction.ChaScore2 + reportAction.ChaScore4 ); uint32 Healed; double dispatchedXpGain = 0.0f; diff --git a/code/ryzom/server/src/entities_game_service/progression/progression_pve.h b/code/ryzom/server/src/entities_game_service/progression/progression_pve.h index 2c9e9aba2..58444cadd 100644 --- a/code/ryzom/server/src/entities_game_service/progression/progression_pve.h +++ b/code/ryzom/server/src/entities_game_service/progression/progression_pve.h @@ -328,12 +328,12 @@ struct CCreatureTakenDamage } /// apply regen, remove an equal part of damage on each registered entity - void applyRegenHP(sint32 regenHP) + void applyRegenChaScore1(sint32 regenChaScore1) { - if (regenHP == 0 || (PlayerInflictedDamage.size() + CreatureInflictedDamage.size() == 0) ) + if (regenChaScore1 == 0 || (PlayerInflictedDamage.size() + CreatureInflictedDamage.size() == 0) ) return; - const float damageLoss = (float)regenHP / float(PlayerInflictedDamage.size() + CreatureInflictedDamage.size()); + const float damageLoss = (float)regenChaScore1 / float(PlayerInflictedDamage.size() + CreatureInflictedDamage.size()); // remove damage for teams for ( uint i = 0 ; i < PlayerInflictedDamage.size() ; ++i) @@ -455,7 +455,7 @@ public: /// remove a creature (so clear all references on it) void removeCreature(TDataSetRow creature); /// apply regen of a creature - void applyRegenHP(TDataSetRow creature, sint32 regenHP); + void applyRegenChaScore1(TDataSetRow creature, sint32 regenChaScore1); /// attribute player inflicted damage to a fictious creature (when player enters water) void transferDamageOnFictitiousCreature(TDataSetRow playerRowId, uint16 teamId); /// attribute player inflicted damage on a specific creature to a fictious creature (to avoid exploits) diff --git a/code/ryzom/server/src/entities_game_service/progression/progression_pvp.cpp b/code/ryzom/server/src/entities_game_service/progression/progression_pvp.cpp index d819db2ee..a8fc50458 100644 --- a/code/ryzom/server/src/entities_game_service/progression/progression_pvp.cpp +++ b/code/ryzom/server/src/entities_game_service/progression/progression_pvp.cpp @@ -901,9 +901,9 @@ void CDamageScoreManager::reportAction(const TReportAction & action) const bool isCurative = isCurativeAction(action); // add damage to the score if any - if (target != NULL && isOffensive && action.Hp > 0) + if (target != NULL && isOffensive && action.ChaScore1 > 0) { - addDamage(actor, target, action.Hp); + addDamage(actor, target, action.ChaScore1); } // for a creature actor we only need to add damage @@ -929,9 +929,9 @@ void CDamageScoreManager::reportAction(const TReportAction & action) { if (targetChar != NULL) { - // apply HP heal as HP regen - if (action.Hp > 0) - changeAllDamageEquitably(targetChar->getEntityRowId(), -sint32(action.Hp)); + // apply ChaScore1 heal as ChaScore1 regen + if (action.ChaScore1 > 0) + changeAllDamageEquitably(targetChar->getEntityRowId(), -sint32(action.ChaScore1)); // discard curative actions on a non team member if (actorChar->getTeamId() != CTEAM::InvalidTeamId && actorChar->getTeamId() != targetChar->getTeamId()) @@ -1074,19 +1074,19 @@ void CDamageScoreManager::disbandTeam(TTeamId teamId, const std::listgetEntityRowId(), -regenHP); + changeAllDamageEquitably(playerChar->getEntityRowId(), -regenChaScore1); } //----------------------------------------------------------------------------- @@ -1664,7 +1664,7 @@ bool CDamageScoreManager::isOffensiveAction(const TReportAction & action) const { case ACTNATURE::FIGHT: // discard fight actions without any damage - if (action.Hp == 0) + if (action.ChaScore1 == 0) return false; case ACTNATURE::OFFENSIVE_MAGIC: diff --git a/code/ryzom/server/src/entities_game_service/progression/progression_pvp.h b/code/ryzom/server/src/entities_game_service/progression/progression_pvp.h index f426c71e2..d66d97302 100644 --- a/code/ryzom/server/src/entities_game_service/progression/progression_pvp.h +++ b/code/ryzom/server/src/entities_game_service/progression/progression_pvp.h @@ -300,8 +300,8 @@ public: /// \param members : members of the team before it is separated void disbandTeam(TTeamId teamId, const std::list & members); - /// a player regenerates HP - void playerRegenHP(const CCharacter * playerChar, sint32 regenHP); + /// a player regenerates ChaScore1 + void playerRegenChaScore1(const CCharacter * playerChar, sint32 regenChaScore1); /// report a player death void playerDeath(CCharacter * playerChar, const CCharacter * finalBlower); /// report a spire destroyed diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp index 31eacae82..18bd44464 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp @@ -390,7 +390,7 @@ bool CPVPFactionRewardManager::startTotemBuilding( uint16 regionIndex, CCharacte _FactionsPossessions[ allegiance.first ].NbTotems++; - // update HP for all totems & faction points + // update ChaScore1 for all totems & faction points // &send message to clients updateFactionPointPool( allegiance.first, -FactionPoolSizeToBuild ); @@ -455,7 +455,7 @@ bool CPVPFactionRewardManager::destroyTotem( uint16 regionIndex, TDataSetRow kil _FactionsPossessions[oldFaction].NbTotems--; _UpdateLevel( oldFaction ); - // update HP for all totems + // update ChaScore1 for all totems updateFactionPointPool( oldFaction, 0 ); _DataUpdated = true; @@ -647,7 +647,7 @@ void CPVPFactionRewardManager::tickUpdate() // the totem has finished building during last tick _UpdateLevel( pTotem->getOwnerFaction() ); - // update all totem HP + // update all totem ChaScore1 updateFactionPointPool( pTotem->getOwnerFaction(), 0 ); // spawn totem npc (guards) @@ -718,7 +718,7 @@ void CPVPFactionRewardManager::updateFactionPointPool( PVP_CLAN::TPVPClan factio if ( _FactionsPossessions[faction].NbTotems > 0 ) { - sint32 newTotemHp = _FactionsPossessions[faction].FactionPointsPool / _FactionsPossessions[faction].NbTotems; + sint32 newTotemChaScore1 = _FactionsPossessions[faction].FactionPointsPool / _FactionsPossessions[faction].NbTotems; map::iterator it = _TotemBasesPerRegion.begin(); while ( it != _TotemBasesPerRegion.end() ) @@ -727,7 +727,7 @@ void CPVPFactionRewardManager::updateFactionPointPool( PVP_CLAN::TPVPClan factio if ( pTotem && ( pTotem->getOwnerFaction() == faction ) && ( pTotem->isBuildingFinished() == true ) ) { if ( pTotem->getBotObject() ) - pTotem->getBotObject()->getScores()._PhysicalScores[SCORES::hit_points].Max = newTotemHp; + pTotem->getBotObject()->getScores()._PhysicalScores[SCORES::cha_score1].Max = newTotemChaScore1; } it++; } diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.cpp index eda41255e..32ed82eec 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.cpp @@ -48,9 +48,9 @@ CTotemBase::CTotemBase( std::string const& name ) _TotemEffect = EFFECT_FAMILIES::Unknown; _BotObject = NULL; _IsBuildingFinished = true; - _TotemCurrentHP = 1; - _TotemMaxHP = 1; - _BuildHpGain = 0; + _TotemCurrentChaScore1 = 1; + _TotemMaxChaScore1 = 1; + _BuildChaScore1Gain = 0; _LastTickUpdate = 0; _BuildingStartTime = 0; _LastTickAttackMessageSended = 0; @@ -126,14 +126,14 @@ void CTotemBase::getTotemEffect( CCharacter* user, vector& outEffects switch ( _TotemEffect ) { // characteristics modifiers - case TotemStatsHP : - case TotemStatsSap : - case TotemStatsSta : - case TotemStatsFoc : - case TotemRegenHP : - case TotemRegenSap : - case TotemRegenSta : - case TotemRegenFoc : + case TotemStatsChaScore1 : + case TotemStatsChaScore3 : + case TotemStatsChaScore2 : + case TotemStatsChaScore4 : + case TotemRegenChaScore1 : + case TotemRegenChaScore3 : + case TotemRegenChaScore2 : + case TotemRegenChaScore4 : case TotemMiscMov : pEffect = new CTotemCharacEffect( user->getEntityRowId(), user->getEntityRowId(), _TotemEffect, effectValue ); @@ -188,13 +188,13 @@ void CTotemBase::startBuilding( CCharacter * builder ) if ( _BotObject ) { - _BotObject->getScores()._PhysicalScores[SCORES::hit_points].Current = 1; - _TotemCurrentHP = 1; + _BotObject->getScores()._PhysicalScores[SCORES::cha_score1].Current = 1; + _TotemCurrentChaScore1 = 1; _BotObject->getPhysCharacs()._PhysicalCharacteristics[SCharacteristicsAndScores::current_regenerate].Base = 0; - _TotemMaxHP = (float)_BotObject->getScores()._PhysicalScores[SCORES::hit_points].Max; - _BuildHpGain = _TotemMaxHP / (float)TotemBuildTime; + _TotemMaxChaScore1 = (float)_BotObject->getScores()._PhysicalScores[SCORES::cha_score1].Max; + _BuildChaScore1Gain = _TotemMaxChaScore1 / (float)TotemBuildTime; } } @@ -212,8 +212,8 @@ void CTotemBase::setBotObject( CCreature* botObject ) // we must then restore some information if ( _IsBuildingFinished == false ) { - _BotObject->getScores()._PhysicalScores[SCORES::hit_points].Max = (sint32)_TotemMaxHP; - _BotObject->getScores()._PhysicalScores[SCORES::hit_points].Current = (sint32)_TotemCurrentHP; + _BotObject->getScores()._PhysicalScores[SCORES::cha_score1].Max = (sint32)_TotemMaxChaScore1; + _BotObject->getScores()._PhysicalScores[SCORES::cha_score1].Current = (sint32)_TotemCurrentChaScore1; } } @@ -229,9 +229,9 @@ void CTotemBase::destroyTotem() if ( _BotObject ) { - _BotObject->getPhysCharacs()._PhysicalCharacteristics[SCORES::hit_points].CurrentRegenerate = 0; - _BotObject->getScores()._PhysicalScores[SCORES::hit_points].Current = - _BotObject->getScores()._PhysicalScores[SCORES::hit_points].Max; + _BotObject->getPhysCharacs()._PhysicalCharacteristics[SCORES::cha_score1].CurrentRegenerate = 0; + _BotObject->getScores()._PhysicalScores[SCORES::cha_score1].Current = + _BotObject->getScores()._PhysicalScores[SCORES::cha_score1].Max; // change the used sheet @@ -266,15 +266,15 @@ bool CTotemBase::tickUpdate() NLMISC::TGameCycle currentCycle = CTickEventHandler::getGameCycle(); - _TotemCurrentHP += ( currentCycle - _LastTickUpdate ) * _BuildHpGain; + _TotemCurrentChaScore1 += ( currentCycle - _LastTickUpdate ) * _BuildChaScore1Gain; - if ( _TotemCurrentHP > _TotemMaxHP ) - _TotemCurrentHP = _TotemMaxHP; + if ( _TotemCurrentChaScore1 > _TotemMaxChaScore1 ) + _TotemCurrentChaScore1 = _TotemMaxChaScore1; if ( _BotObject ) { - _BotObject->getScores()._PhysicalScores[SCORES::hit_points].Current = (sint32)_TotemCurrentHP; - nlinfo( "Totem %d HP : %d", _RegionAlias, _BotObject->currentHp() ); + _BotObject->getScores()._PhysicalScores[SCORES::cha_score1].Current = (sint32)_TotemCurrentChaScore1; + nlinfo( "Totem %d ChaScore1 : %d", _RegionAlias, _BotObject->currentChaScore1() ); } if ( currentCycle - _BuildingStartTime >= TotemBuildTime ) @@ -411,9 +411,9 @@ bool CTotemBase::canStartBuilding( CCharacter* actor ) PROP(bool, _IsBuildingFinished)\ PROP_GAME_CYCLE_COMP(_BuildingStartTime)\ PROP_GAME_CYCLE_COMP(_LastTickUpdate)\ - PROP(float, _BuildHpGain)\ - PROP(float, _TotemMaxHP)\ - PROP(float, _TotemCurrentHP)\ + PROP(float, _BuildChaScore1Gain)\ + PROP(float, _TotemMaxChaScore1)\ + PROP(float, _TotemCurrentChaScore1)\ //#pragma message( PERSISTENT_GENERATION_MESSAGE ) #include "game_share/persistent_data_template.h" diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.h b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.h index 3ea9d5602..3f4cec213 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.h +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_base.h @@ -149,14 +149,14 @@ private : // these information must be kept or they will be lost // while changing the bot object sheetId - /// HP Gained during building - float _BuildHpGain; + /// ChaScore1 Gained during building + float _BuildChaScore1Gain; - /// Max HP for Totem - float _TotemMaxHP; + /// Max ChaScore1 for Totem + float _TotemMaxChaScore1; - /// Current HP for Totem - float _TotemCurrentHP; + /// Current ChaScore1 for Totem + float _TotemCurrentChaScore1; /// Builder of totem TDataSetRow _Builder; diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_effect.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_effect.cpp index 36a827fa1..54e7825a5 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/totem_effect.cpp @@ -98,40 +98,40 @@ CTotemCharacEffect::CTotemCharacEffect( const TDataSetRow & creatorRowId, { switch ( family ) { - case TotemStatsHP : - _AffectedCharac = constitution; + case TotemStatsChaScore1 : + _AffectedCharac = cha1; break; - case TotemRegenHP : - _AffectedCharac = metabolism; + case TotemRegenChaScore1 : + _AffectedCharac = cha1_reg; break; - case TotemStatsSap : - _AffectedCharac = intelligence; + case TotemStatsChaScore2 : + _AffectedCharac = cha2; break; - case TotemRegenSap : - _AffectedCharac = wisdom; + case TotemRegenChaScore2 : + _AffectedCharac = cha2_reg; break; - case TotemStatsSta : - _AffectedCharac = strength; + case TotemStatsChaScore3 : + _AffectedCharac = cha3; break; - case TotemRegenSta : - _AffectedCharac = well_balanced; + case TotemRegenChaScore3 : + _AffectedCharac = cha3_reg; break; - case TotemStatsFoc : - _AffectedCharac = dexterity; + case TotemStatsChaScore4 : + _AffectedCharac = cha4; break; - case TotemRegenFoc : - _AffectedCharac = will; + case TotemRegenChaScore4 : + _AffectedCharac = cha4_reg; break; case TotemMiscMov : - _AffectedCharac = constitution; // arbitrary value < Unknown + _AffectedCharac = cha1; // arbitrary value < Unknown break; default : diff --git a/code/ryzom/server/src/entities_game_service/team_manager/team.cpp b/code/ryzom/server/src/entities_game_service/team_manager/team.cpp index 13b9a6fe9..64d0f152a 100644 --- a/code/ryzom/server/src/entities_game_service/team_manager/team.cpp +++ b/code/ryzom/server/src/entities_game_service/team_manager/team.cpp @@ -184,43 +184,43 @@ void CTeam::addCharacter(CCharacter *newCharacter) uint i =0; for (std::list::const_iterator it = _TeamMembers.begin() ; it != _TeamMembers.end() ; ++it) { - uint8 hp, sap, stamina; + uint8 ChaScore1, ChaScore3, ChaScore2; uint32 nameId; CCharacter* character = PlayerManager.getOnlineChar( (*it) ); if (character != NULL) { // update the current character team slot ///\todo: can be done outside the loop - if ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max != 0) - hp = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Current ) ) / ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max ) ); + if ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max != 0) + ChaScore1 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Current ) ) / ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max ) ); else - hp = 0; + ChaScore1 = 0; - if ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::sap ].Max != 0) - sap = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::sap ].Current ) ) / ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::sap ].Max ) ); + if ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max != 0) + ChaScore3 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Current ) ) / ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max ) ); else - sap = 0; + ChaScore3 = 0; - if ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max != 0) - stamina = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::stamina ].Current ) ) / ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max ) ); + if ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max != 0) + ChaScore2 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Current ) ) / ( newCharacter->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max ) ); else - stamina = 0; + ChaScore2 = 0; CMirrorPropValueRO nameIndexValue1( TheDataset, newCharacter->getId(), "NameIndex" ); nameId = nameIndexValue1(); CBankAccessor_PLR::TGROUP::TArray &arrayItem = CBankAccessor_PLR::getGROUP().getArray(position); -// sprintf(buffer, "GROUP:%d:HP",position ); -// character->_PropertyDatabase.setProp( buffer, hp ); - arrayItem.setHP(character->_PropertyDatabase, hp); +// sprintf(buffer, "GROUP:%d:ChaScore1",position ); +// character->_PropertyDatabase.setProp( buffer, ChaScore1 ); + arrayItem.setChaScore1(character->_PropertyDatabase, ChaScore1); -// sprintf(buffer, "GROUP:%d:SAP",position ); -// character->_PropertyDatabase.setProp( buffer, sap ); - arrayItem.setSAP(character->_PropertyDatabase, sap); +// sprintf(buffer, "GROUP:%d:ChaScore3",position ); +// character->_PropertyDatabase.setProp( buffer, ChaScore3 ); + arrayItem.setChaScore3(character->_PropertyDatabase, ChaScore3); -// sprintf(buffer, "GROUP:%d:STA",position ); -// character->_PropertyDatabase.setProp( buffer, stamina ); - arrayItem.setSTA(character->_PropertyDatabase, stamina); +// sprintf(buffer, "GROUP:%d:ChaScore2",position ); +// character->_PropertyDatabase.setProp( buffer, ChaScore2 ); + arrayItem.setChaScore2(character->_PropertyDatabase, ChaScore2); // sprintf(buffer, "GROUP:%d:NAME",position ); // character->_PropertyDatabase.setProp( buffer, nameId ); @@ -235,36 +235,36 @@ void CTeam::addCharacter(CCharacter *newCharacter) arrayItem.setPRESENT(character->_PropertyDatabase, true); // update the new character team slot corresponding to character - if ( character->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max != 0) - hp = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( character->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Current ) ) / ( character->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max ) ); + if ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max != 0) + ChaScore1 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Current ) ) / ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max ) ); else - hp = 0; + ChaScore1 = 0; - if ( character->getPhysScores()._PhysicalScores[ SCORES::sap ].Max != 0) - sap = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( character->getPhysScores()._PhysicalScores[ SCORES::sap ].Current ) ) / ( character->getPhysScores()._PhysicalScores[ SCORES::sap ].Max ) ); + if ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max != 0) + ChaScore3 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Current ) ) / ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max ) ); else - sap = 0; + ChaScore3 = 0; - if ( character->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max != 0) - stamina = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( character->getPhysScores()._PhysicalScores[ SCORES::stamina ].Current ) ) / ( character->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max ) ); + if ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max != 0) + ChaScore2 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Current ) ) / ( character->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max ) ); else - stamina = 0; + ChaScore2 = 0; CMirrorPropValueRO nameIndexValue2( TheDataset, character->getId(), "NameIndex" ); nameId = nameIndexValue2(); CBankAccessor_PLR::TGROUP::TArray &newArrayItem = CBankAccessor_PLR::getGROUP().getArray(i); -// sprintf(buffer, "GROUP:%d:HP",i ); -// newCharacter->_PropertyDatabase.setProp( buffer, hp ); - newArrayItem.setHP(newCharacter->_PropertyDatabase, hp); +// sprintf(buffer, "GROUP:%d:ChaScore1",i ); +// newCharacter->_PropertyDatabase.setProp( buffer, ChaScore1 ); + newArrayItem.setChaScore1(newCharacter->_PropertyDatabase, ChaScore1); -// sprintf(buffer, "GROUP:%d:SAP",i ); -// newCharacter->_PropertyDatabase.setProp( buffer, sap ); - newArrayItem.setSAP(newCharacter->_PropertyDatabase, sap); +// sprintf(buffer, "GROUP:%d:ChaScore3",i ); +// newCharacter->_PropertyDatabase.setProp( buffer, ChaScore3 ); + newArrayItem.setChaScore3(newCharacter->_PropertyDatabase, ChaScore3); -// sprintf(buffer, "GROUP:%d:STA",i ); -// newCharacter->_PropertyDatabase.setProp( buffer, stamina ); - newArrayItem.setSTA(newCharacter->_PropertyDatabase, stamina); +// sprintf(buffer, "GROUP:%d:ChaScore2",i ); +// newCharacter->_PropertyDatabase.setProp( buffer, ChaScore2 ); + newArrayItem.setChaScore2(newCharacter->_PropertyDatabase, ChaScore2); // sprintf(buffer, "GROUP:%d:NAME",i ); // newCharacter->_PropertyDatabase.setProp( buffer, nameId ); @@ -479,7 +479,7 @@ void CTeam::removeCharacter( CCharacter * player ) for (std::list::iterator it = _TeamMembers.begin() ; it != _TeamMembers.end() ; ++it) { - uint8 hp, sap, stamina; + uint8 ChaScore1, ChaScore3, ChaScore2; uint32 nameId; uint pos = 0; // char buffer[256]; @@ -499,33 +499,33 @@ void CTeam::removeCharacter( CCharacter * player ) if (ch2 != NULL) { // update new char for old char - if ( ch2->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max != 0) - hp = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max ) ); + if ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max != 0) + ChaScore1 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max ) ); else - hp = 0; - if ( ch2->getPhysScores()._PhysicalScores[ SCORES::sap ].Max != 0) - sap = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::sap ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::sap ].Max ) ); + ChaScore1 = 0; + if ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max != 0) + ChaScore3 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max ) ); else - sap = 0; - if ( ch2->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max != 0) - stamina = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::stamina ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max ) ); + ChaScore3 = 0; + if ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max != 0) + ChaScore2 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max ) ); else - stamina = 0; + ChaScore2 = 0; CMirrorPropValueRO nameIndexValue( TheDataset, ch2->getId(), "NameIndex" ); nameId = nameIndexValue(); -// sprintf(buffer, "GROUP:%d:HP",pos ); -// ch1->_PropertyDatabase.setProp( buffer, hp ); - groupItem.setHP(ch1->_PropertyDatabase, hp); +// sprintf(buffer, "GROUP:%d:ChaScore1",pos ); +// ch1->_PropertyDatabase.setProp( buffer, ChaScore1 ); + groupItem.setChaScore1(ch1->_PropertyDatabase, ChaScore1); -// sprintf(buffer, "GROUP:%d:SAP",pos ); -// ch1->_PropertyDatabase.setProp( buffer, sap ); - groupItem.setSAP(ch1->_PropertyDatabase, sap); +// sprintf(buffer, "GROUP:%d:ChaScore3",pos ); +// ch1->_PropertyDatabase.setProp( buffer, ChaScore3 ); + groupItem.setChaScore3(ch1->_PropertyDatabase, ChaScore3); -// sprintf(buffer, "GROUP:%d:STA",pos ); -// ch1->_PropertyDatabase.setProp( buffer, stamina ); - groupItem.setSTA(ch1->_PropertyDatabase, stamina); +// sprintf(buffer, "GROUP:%d:ChaScore2",pos ); +// ch1->_PropertyDatabase.setProp( buffer, ChaScore2 ); + groupItem.setChaScore2(ch1->_PropertyDatabase, ChaScore2); // sprintf(buffer, "GROUP:%d:NAME",pos ); // ch1->_PropertyDatabase.setProp( buffer, nameId ); @@ -546,7 +546,7 @@ void CTeam::removeCharacter( CCharacter * player ) // sprintf(buffer, "GROUP:%d:PRESENT",pos ); // ch1->_PropertyDatabase.setProp( buffer, (uint8)0 ); - groupItem.setHP(ch1->_PropertyDatabase, 0); + groupItem.setChaScore1(ch1->_PropertyDatabase, 0); // sprintf(buffer, "GROUP:%d:NAME",pos ); // ch1->_PropertyDatabase.setProp( buffer, (uint32)0 ); groupItem.setNAME(ch1->_PropertyDatabase, 0); @@ -790,14 +790,14 @@ void CTeam::updateCharacterScore(const CCharacter *player, SCORES::TScores score // character->_PropertyDatabase.setProp( buffer, value ); switch(score) { - case SCORES::hit_points: - CBankAccessor_PLR::getGROUP().getArray(position).setHP(character->_PropertyDatabase, value); + case SCORES::cha_score1: + CBankAccessor_PLR::getGROUP().getArray(position).setChaScore1(character->_PropertyDatabase, value); break; - case SCORES::stamina : - CBankAccessor_PLR::getGROUP().getArray(position).setSTA(character->_PropertyDatabase, value); + case SCORES::cha_score2 : + CBankAccessor_PLR::getGROUP().getArray(position).setChaScore2(character->_PropertyDatabase, value); break; - case SCORES::sap : - CBankAccessor_PLR::getGROUP().getArray(position).setSAP(character->_PropertyDatabase, value); + case SCORES::cha_score3 : + CBankAccessor_PLR::getGROUP().getArray(position).setChaScore3(character->_PropertyDatabase, value); break; default: STOP("Invalid score "<::iterator it = _TeamMembers.begin() ; it != _TeamMembers.end() ; ++it) { - uint8 hp, sap, stamina; + uint8 ChaScore1, ChaScore3, ChaScore2; uint32 nameId; uint pos = 0; @@ -1183,25 +1183,25 @@ void CTeam::updateMembersDb() if (ch2 != NULL) { // update new char for old char - if ( ch2->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max != 0) - hp = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::hit_points ].Max ) ); + if ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max != 0) + ChaScore1 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score1 ].Max ) ); else - hp = 0; - if ( ch2->getPhysScores()._PhysicalScores[ SCORES::sap ].Max != 0) - sap = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::sap ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::sap ].Max ) ); + ChaScore1 = 0; + if ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max != 0) + ChaScore3 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score3 ].Max ) ); else - sap = 0; - if ( ch2->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max != 0) - stamina = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::stamina ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::stamina ].Max ) ); + ChaScore3 = 0; + if ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max != 0) + ChaScore2 = (uint8) ( ( float(TeamMembersStatusMaxValue) * ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Current ) ) / ( ch2->getPhysScores()._PhysicalScores[ SCORES::cha_score2 ].Max ) ); else - stamina = 0; + ChaScore2 = 0; CMirrorPropValueRO nameIndexValue( TheDataset, ch2->getId(), "NameIndex" ); nameId = nameIndexValue(); - groupItem.setHP(ch1->_PropertyDatabase, hp); - groupItem.setSAP(ch1->_PropertyDatabase, sap); - groupItem.setSTA(ch1->_PropertyDatabase, stamina); + groupItem.setChaScore1(ch1->_PropertyDatabase, ChaScore1); + groupItem.setChaScore3(ch1->_PropertyDatabase, ChaScore3); + groupItem.setChaScore2(ch1->_PropertyDatabase, ChaScore2); groupItem.setNAME(ch1->_PropertyDatabase, nameId); groupItem.setUID(ch1->_PropertyDatabase, ch2->getEntityRowId().getCompressedIndex()); groupItem.setPRESENT(ch1->_PropertyDatabase, true); diff --git a/code/ryzom/server/src/frontend_service/distance_prioritizer.cpp b/code/ryzom/server/src/frontend_service/distance_prioritizer.cpp index 04bf990cd..b11484baa 100644 --- a/code/ryzom/server/src/frontend_service/distance_prioritizer.cpp +++ b/code/ryzom/server/src/frontend_service/distance_prioritizer.cpp @@ -628,7 +628,7 @@ void CDistancePrioritizer::arbitrateDiscreetBehaviourProperty(const CPropertyHis case MBEHAV::CAST_FIRE: refDistanceProperty = PROPERTY_TARGET_LIST; break; - case MBEHAV::CAST_HEALHP: + case MBEHAV::CAST_HEALChaScore1: refDistanceProperty = PROPERTY_TARGET_LIST; break; case MBEHAV::CAST_MAD: diff --git a/code/ryzom/server/src/general_utilities_service/stat_character.cpp b/code/ryzom/server/src/general_utilities_service/stat_character.cpp index 72ab37987..f2bb5f0f8 100644 --- a/code/ryzom/server/src/general_utilities_service/stat_character.cpp +++ b/code/ryzom/server/src/general_utilities_service/stat_character.cpp @@ -355,10 +355,10 @@ using namespace NLMISC; PROP(float,DefensiveAfflictionCastingTimeFactor)\ PROP(float,DefensiveAfflictionPowerFactor)\ PROP(uint8,Color)\ - PROP(sint32,HpBuff)\ - PROP(sint32,SapBuff)\ - PROP(sint32,StaBuff)\ - PROP(sint32,FocusBuff)\ + PROP(sint32,ChaScore1Buff)\ + PROP(sint32,ChaScore3Buff)\ + PROP(sint32,ChaScore2Buff)\ + PROP(sint32,ChaScore4Buff)\ PROP(CSString,Protection)\ #include "game_share/persistent_data_template.h" diff --git a/code/ryzom/server/src/general_utilities_service/stat_character.h b/code/ryzom/server/src/general_utilities_service/stat_character.h index 7356cf961..b0bd1353b 100644 --- a/code/ryzom/server/src/general_utilities_service/stat_character.h +++ b/code/ryzom/server/src/general_utilities_service/stat_character.h @@ -468,10 +468,10 @@ public: DefensiveAfflictionCastingTimeFactor=0.0f; DefensiveAfflictionPowerFactor=0.0f; Color=0; - HpBuff=0; - SapBuff=0; - StaBuff=0; - FocusBuff=0; + ChaScore1Buff=0; + ChaScore3Buff=0; + ChaScore2Buff=0; + ChaScore4Buff=0; } float Durability; @@ -498,10 +498,10 @@ public: float DefensiveAfflictionCastingTimeFactor; float DefensiveAfflictionPowerFactor; uint8 Color; - sint32 HpBuff; - sint32 SapBuff; - sint32 StaBuff; - sint32 FocusBuff; + sint32 ChaScore1Buff; + sint32 ChaScore3Buff; + sint32 ChaScore2Buff; + sint32 ChaScore4Buff; NLMISC::CSString Protection; }; diff --git a/code/ryzom/server/src/general_utilities_service/stat_user_char_info_extractors.cpp b/code/ryzom/server/src/general_utilities_service/stat_user_char_info_extractors.cpp index 1f39a8159..99aab595f 100644 --- a/code/ryzom/server/src/general_utilities_service/stat_user_char_info_extractors.cpp +++ b/code/ryzom/server/src/general_utilities_service/stat_user_char_info_extractors.cpp @@ -245,24 +245,24 @@ INFO_EXTRACTOR(Sessions,"home session id and current session id","home,session") NLMISC::toString("%s%u",shardNames.empty()?"":"Ring:",curSessionId)); } -INFO_EXTRACTOR(Characs,"constitution, strength, etc","Constitution,Metabolism,Intelligence,Wisdom,Strength,WellBalanced,Dexterity,Will") +INFO_EXTRACTOR(Characs,"Cha1, Cha2, etc","Cha1,Cha1Reg,Cha3,Cha3Reg,Cha2,Cha2Reg,Cha4,Cha4Reg") { - job->charTblSetEntry("Constitution",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Constitution")->second)); - job->charTblSetEntry("Metabolism", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Metabolism")->second)); - job->charTblSetEntry("Intelligence",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Intelligence")->second)); - job->charTblSetEntry("Wisdom", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Wisdom")->second)); - job->charTblSetEntry("Strength", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Strength")->second)); - job->charTblSetEntry("WellBalanced",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("WellBalanced")->second)); - job->charTblSetEntry("Dexterity", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Dexterity")->second)); - job->charTblSetEntry("Will", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Will")->second)); + job->charTblSetEntry("Cha1",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha1")->second)); + job->charTblSetEntry("Cha1Reg", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha1Reg")->second)); + job->charTblSetEntry("Cha3",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha3")->second)); + job->charTblSetEntry("Cha3Reg", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha3Reg")->second)); + job->charTblSetEntry("Cha2", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha2")->second)); + job->charTblSetEntry("Cha2Reg",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha2Reg")->second)); + job->charTblSetEntry("Cha4", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha4")->second)); + job->charTblSetEntry("Cha4Reg", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha4Reg")->second)); } -INFO_EXTRACTOR(Stats,"hp, sap, sta, focus","HP,Stamina,Sap,Focus") +INFO_EXTRACTOR(Stats,"ChaScore1, ChaScore3, ChaScore2, ChaScore4","ChaScore1,ChaScore2,ChaScore3,ChaScore4") { - job->charTblSetEntry("HP", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("HitPoints")->second.Current)); - job->charTblSetEntry("Stamina", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("Stamina")->second.Current)); - job->charTblSetEntry("Sap", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("Sap")->second.Current)); - job->charTblSetEntry("Focus", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("Focus")->second.Current)); + job->charTblSetEntry("ChaScore1", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("ChaScore1")->second.Current)); + job->charTblSetEntry("ChaScore2", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("ChaScore2")->second.Current)); + job->charTblSetEntry("ChaScore3", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("ChaScore3")->second.Current)); + job->charTblSetEntry("ChaScore4", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("ChaScore4")->second.Current)); } INFO_EXTRACTOR(Fames,"main fame scores","Fyros,Kami,Karavan,Matis,Tryker,Zorai") diff --git a/code/ryzom/server/src/monitor_service/client.cpp b/code/ryzom/server/src/monitor_service/client.cpp index ce2fdc5dc..08e17bf36 100644 --- a/code/ryzom/server/src/monitor_service/client.cpp +++ b/code/ryzom/server/src/monitor_service/client.cpp @@ -376,15 +376,15 @@ void CMonitorClient::update () if ((Entites[entityRawIndex].Flags & CEntityEntry::MiscPropDirty) != 0 && (Entites[entityRawIndex].Flags & CEntityEntry::Pending) == 0) { TDataSetRow entityIndex = TDataSetRow::createFromRawIndex (entityRawIndex); - CMirrorPropValueRO valueCurrentHP( TheDataset, entityIndex, DSPropertyCURRENT_HIT_POINTS); - CMirrorPropValueRO valueMaxHP( TheDataset, entityIndex, DSPropertyMAX_HIT_POINTS); + CMirrorPropValueRO valueCurrentChaScore1( TheDataset, entityIndex, DSPropertyCURRENT_ChaScore1); + CMirrorPropValueRO valueMaxChaScore1( TheDataset, entityIndex, DSPropertyMAX_ChaScore1); CMirrorPropValueRO valueMode( TheDataset, entityIndex, DSPropertyMODE); CMirrorPropValueRO valueBehaviour( TheDataset, entityIndex, DSPropertyBEHAVIOUR); CMonitorClient::CMiscPropData miscPropData; miscPropData.Id = entityRawIndex; - miscPropData.CurrentHP = valueCurrentHP; - miscPropData.MaxHP = valueMaxHP; + miscPropData.CurrentChaScore1 = valueCurrentChaScore1; + miscPropData.MaxChaScore1 = valueMaxChaScore1; miscPropData.Mode = (uint8) valueMode; miscPropData.Behaviour = (uint8) valueBehaviour; MiscProp.push_back (miscPropData); @@ -477,8 +477,8 @@ void CMonitorClient::update () for (i=0; ideclareProperty( "Mode", PSOReadOnly | PSONotifyChanges ); CMirrors::DataSet->declareProperty( "Behaviour", PSOReadOnly | PSONotifyChanges ); CMirrors::DataSet->declareProperty( "Target", PSOReadOnly ); - CMirrors::DataSet->declareProperty( "CurrentHitPoints", PSOReadOnly | PSONotifyChanges ); - CMirrors::DataSet->declareProperty( "MaxHitPoints", PSOReadOnly | PSONotifyChanges ); + CMirrors::DataSet->declareProperty( "CurrentChaScore1Points", PSOReadOnly | PSONotifyChanges ); + CMirrors::DataSet->declareProperty( "MaxChaScore1", PSOReadOnly | PSONotifyChanges ); CMirrors::DataSet->declareProperty( "BestRoleLevel", PSOReadOnly ); CMirrors::DataSet->declareProperty( "CombatState", PSOReadOnly ); CMirrors::DataSet->declareProperty( "TeamId", PSOReadOnly ); @@ -235,8 +235,8 @@ void CMirrors::processMirrorUpdates() // deals with others less frequently updated properties if (wasPresent) { - if (propIndex == DSPropertyCURRENT_HIT_POINTS || - propIndex == DSPropertyMAX_HIT_POINTS || + if (propIndex == DSPropertyCURRENT_ChaScore1 || + propIndex == DSPropertyMAX_ChaScore1 || propIndex == DSPropertyMODE || propIndex == DSPropertyBEHAVIOUR ) diff --git a/code/ryzom/server/src/monitor_service/mirrors.h b/code/ryzom/server/src/monitor_service/mirrors.h index 30031dcc1..d6a7a72c4 100644 --- a/code/ryzom/server/src/monitor_service/mirrors.h +++ b/code/ryzom/server/src/monitor_service/mirrors.h @@ -69,8 +69,8 @@ public: static void setVPA( const TDataSetRow& entityIndex, const SAltLookProp &prop ); - static uint32 currentHitPoints( const TDataSetRow& entityIndex ); - static uint32 maxHitPoints( const TDataSetRow& entityIndex ); + static uint32 currentChaScore1( const TDataSetRow& entityIndex ); + static uint32 maxChaScore1( const TDataSetRow& entityIndex ); static uint32 bestRoleLevel( const TDataSetRow& entityIndex ); static uint8 combatState( const TDataSetRow& entityIndex ); static uint16 actionFlags( const TDataSetRow& entityIndex );*/ diff --git a/code/ryzom/server/src/pd_support_service/stat_character.cpp b/code/ryzom/server/src/pd_support_service/stat_character.cpp index f0322bb72..1be7710d3 100644 --- a/code/ryzom/server/src/pd_support_service/stat_character.cpp +++ b/code/ryzom/server/src/pd_support_service/stat_character.cpp @@ -455,10 +455,10 @@ static uint32 LostLogTime= 0; PROP(float,DefensiveAfflictionCastingTimeFactor)\ PROP(float,DefensiveAfflictionPowerFactor)\ PROP(uint8,Color)\ - PROP(sint32,HpBuff)\ - PROP(sint32,SapBuff)\ - PROP(sint32,StaBuff)\ - PROP(sint32,FocusBuff)\ + PROP(sint32,ChaScore1Buff)\ + PROP(sint32,ChaScore3Buff)\ + PROP(sint32,ChaScore2Buff)\ + PROP(sint32,ChaScore4Buff)\ PROP(CSString,Protection)\ #include "game_share/persistent_data_template.h" diff --git a/code/ryzom/server/src/pd_support_service/stat_character.h b/code/ryzom/server/src/pd_support_service/stat_character.h index b4934b3f3..21fb71aab 100644 --- a/code/ryzom/server/src/pd_support_service/stat_character.h +++ b/code/ryzom/server/src/pd_support_service/stat_character.h @@ -610,10 +610,10 @@ public: DefensiveAfflictionCastingTimeFactor=0.0f; DefensiveAfflictionPowerFactor=0.0f; Color=0; - HpBuff=0; - SapBuff=0; - StaBuff=0; - FocusBuff=0; + ChaScore1Buff=0; + ChaScore3Buff=0; + ChaScore2Buff=0; + ChaScore4Buff=0; } float Durability; @@ -640,10 +640,10 @@ public: float DefensiveAfflictionCastingTimeFactor; float DefensiveAfflictionPowerFactor; uint8 Color; - sint32 HpBuff; - sint32 SapBuff; - sint32 StaBuff; - sint32 FocusBuff; + sint32 ChaScore1Buff; + sint32 ChaScore3Buff; + sint32 ChaScore2Buff; + sint32 ChaScore4Buff; NLMISC::CSString Protection; }; diff --git a/code/ryzom/server/src/pd_support_service/stat_user_char_info_extractors.cpp b/code/ryzom/server/src/pd_support_service/stat_user_char_info_extractors.cpp index 1b02e933a..d6198e6be 100644 --- a/code/ryzom/server/src/pd_support_service/stat_user_char_info_extractors.cpp +++ b/code/ryzom/server/src/pd_support_service/stat_user_char_info_extractors.cpp @@ -229,24 +229,24 @@ INFO_EXTRACTOR(Sessions,"home session id and current session id","home,session") job->charTblSetEntry("session", curSessionName); } -INFO_EXTRACTOR(Characs,"constitution, strength, etc","Constitution,Metabolism,Intelligence,Wisdom,Strength,WellBalanced,Dexterity,Will") +INFO_EXTRACTOR(Characs,"Cha1, Cha2, etc","Cha1,Cha1Reg,Cha2,Cha2Reg,Cha3,Cha3Reg,Cha4,Cha4Reg") { - job->charTblSetEntry("Constitution",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Constitution")->second)); - job->charTblSetEntry("Metabolism", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Metabolism")->second)); - job->charTblSetEntry("Intelligence",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Intelligence")->second)); - job->charTblSetEntry("Wisdom", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Wisdom")->second)); - job->charTblSetEntry("Strength", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Strength")->second)); - job->charTblSetEntry("WellBalanced",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("WellBalanced")->second)); - job->charTblSetEntry("Dexterity", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Dexterity")->second)); - job->charTblSetEntry("Will", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Will")->second)); + job->charTblSetEntry("Cha1",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha1")->second)); + job->charTblSetEntry("Cha1Reg", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha1Reg")->second)); + job->charTblSetEntry("Cha3",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha3")->second)); + job->charTblSetEntry("Cha3Reg", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha3Reg")->second)); + job->charTblSetEntry("Cha2", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha2")->second)); + job->charTblSetEntry("Cha2Reg",NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha2Reg")->second)); + job->charTblSetEntry("Cha4", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha4")->second)); + job->charTblSetEntry("Cha4Reg", NLMISC::toString(c->EntityBase._PhysCharacs._PhysicalCharacteristics.find("Cha4Reg")->second)); } -INFO_EXTRACTOR(Stats,"hp, sap, sta, focus","HP,Stamina,Sap,Focus") +INFO_EXTRACTOR(Stats,"ChaScore1, ChaScore3, ChaScore2, ChaScore4","ChaScore1,ChaScore2,ChaScore3,ChaScore4") { - job->charTblSetEntry("HP", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("HitPoints")->second.Current)); - job->charTblSetEntry("Stamina", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("Stamina")->second.Current)); - job->charTblSetEntry("Sap", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("Sap")->second.Current)); - job->charTblSetEntry("Focus", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("Focus")->second.Current)); + job->charTblSetEntry("ChaScore1", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("ChaScore1")->second.Current)); + job->charTblSetEntry("ChaScore2", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("ChaScore2")->second.Current)); + job->charTblSetEntry("ChaScore3", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("ChaScore3")->second.Current)); + job->charTblSetEntry("ChaScore4", NLMISC::toString(c->EntityBase._PhysScores.PhysicalScores.find("ChaScore4")->second.Current)); } INFO_EXTRACTOR(Fames,"main fame scores","Fyros,Kami,Karavan,Matis,Tryker,Zorai") diff --git a/code/ryzom/server/src/sabrina/combat_phrase.cpp b/code/ryzom/server/src/sabrina/combat_phrase.cpp index a0bf5f4e0..d29f33403 100644 --- a/code/ryzom/server/src/sabrina/combat_phrase.cpp +++ b/code/ryzom/server/src/sabrina/combat_phrase.cpp @@ -171,8 +171,8 @@ void CCombatPhrase::init() _CyclicPhrase = false; _Idle = false; _TargetTooFarMsg = false; - _NotEnoughStaminaMsg = false; - _NotEnoughHpMsg = false; + _NotEnoughChaScore2Msg = false; + _NotEnoughChaScore1Msg = false; _CurrentTargetIsValid = false; _MeleeCombat = true; @@ -183,8 +183,8 @@ void CCombatPhrase::init() _SabrinaCost = 0; _SabrinaCredit = 0; - _HPCost = 0; - _StaminaCost = 0; + _ChaScore1Cost = 0; + _ChaScore2Cost = 0; _AttackSkillModifier = 0; _ExecutionLengthModifier = 0; @@ -209,10 +209,10 @@ void CCombatPhrase::init() _AggroModifier = 0; _DamageFactor = 1.0f; - _StaminaLossFactor = 0.0f; - _StaminaLossModifier = 0; - _SapLossFactor = 0.0f; - _SapLossModifier = 0; + _ChaScore2LossFactor = 0.0f; + _ChaScore2LossModifier = 0; + _ChaScore3LossFactor = 0.0f; + _ChaScore3LossModifier = 0; _DamagePointBlank = 1.0f; _DamageShortRange = 1.0f; @@ -245,18 +245,18 @@ void CCombatPhrase::addBrick( const CStaticBrick &brick ) { switch(brick.Params[i]->id()) { - case TBrickParam::HP: -// INFOLOG("HP: %i",((CSBrickParamHp *)brick.Params[i])->Hp); - _HPCost += ((CSBrickParamHp *)brick.Params[i])->Hp; + case TBrickParam::ChaScore1: +// INFOLOG("ChaScore1: %i",((CSBrickParamChaScore1 *)brick.Params[i])->ChaScore1); + _ChaScore1Cost += ((CSBrickParamChaScore1 *)brick.Params[i])->ChaScore1; break; - case TBrickParam::SAP: - //printf("SAP: %i\n",((CSBrickParamSap *)brick.Params[i])->Sap); + case TBrickParam::ChaScore3: + //printf("ChaScore3: %i\n",((CSBrickParamChaScore3 *)brick.Params[i])->ChaScore3); break; - case TBrickParam::STA: -// INFOLOG("STA: %i",((CSBrickParamSta *)brick.Params[i])->Sta); - _StaminaCost += ((CSBrickParamSta *)brick.Params[i])->Sta; + case TBrickParam::ChaScore2: +// INFOLOG("ChaScore2: %i",((CSBrickParamChaScore2 *)brick.Params[i])->ChaScore2); + _ChaScore2Cost += ((CSBrickParamChaScore2 *)brick.Params[i])->ChaScore2; break; case TBrickParam::EXECUTION_LENGTH: @@ -285,16 +285,16 @@ void CCombatPhrase::addBrick( const CStaticBrick &brick ) _AggroModifier += ((CSBrickParamAggro *)brick.Params[i])->AggroModifier; break; - case TBrickParam::STA_LOSS: -// INFOLOG("STA_LOSS: %f, %u",((CSBrickParamStaLossFactor *)brick.Params[i])->StaLossFactor, ((CSBrickParamStaLossFactor *)brick.Params[i])->StaLossModifier); - _StaminaLossFactor += ((CSBrickParamStaLossFactor *)brick.Params[i])->StaLossFactor; - _StaminaLossModifier += ((CSBrickParamStaLossFactor *)brick.Params[i])->StaLossModifier; + case TBrickParam::ChaScore2_LOSS: +// INFOLOG("ChaScore2_LOSS: %f, %u",((CSBrickParamChaScore2LossFactor *)brick.Params[i])->ChaScore2LossFactor, ((CSBrickParamChaScore2LossFactor *)brick.Params[i])->ChaScore2LossModifier); + _ChaScore2LossFactor += ((CSBrickParamChaScore2LossFactor *)brick.Params[i])->ChaScore2LossFactor; + _ChaScore2LossModifier += ((CSBrickParamChaScore2LossFactor *)brick.Params[i])->ChaScore2LossModifier; break; - case TBrickParam::SAP_LOSS: -// INFOLOG("SAP_LOSS: %f, %u",((CSBrickParamSapLossFactor *)brick.Params[i])->SapLossFactor, ((CSBrickParamSapLossFactor *)brick.Params[i])->SapLossModifier); - _SapLossFactor += ((CSBrickParamSapLossFactor *)brick.Params[i])->SapLossFactor; - _SapLossModifier += ((CSBrickParamSapLossFactor *)brick.Params[i])->SapLossModifier; + case TBrickParam::ChaScore3_LOSS: +// INFOLOG("ChaScore3_LOSS: %f, %u",((CSBrickParamChaScore3LossFactor *)brick.Params[i])->ChaScore3LossFactor, ((CSBrickParamChaScore3LossFactor *)brick.Params[i])->ChaScore3LossModifier); + _ChaScore3LossFactor += ((CSBrickParamChaScore3LossFactor *)brick.Params[i])->ChaScore3LossFactor; + _ChaScore3LossModifier += ((CSBrickParamChaScore3LossFactor *)brick.Params[i])->ChaScore3LossModifier; break; case TBrickParam::ATT_SKILL_MOD: @@ -376,8 +376,8 @@ bool CCombatPhrase::evaluate(CEvalReturnInfos *msg) _AttackSkill = SKILLS::unknown; _Validated = false; _TargetTooFarMsg = false; - _NotEnoughStaminaMsg = false; - _NotEnoughHpMsg = false; + _NotEnoughChaScore2Msg = false; + _NotEnoughChaScore1Msg = false; _DisengageOnEnd = false; //_CurrentTargetIsValid = false; //_MeleeCombat = true; @@ -562,8 +562,8 @@ bool CCombatPhrase::validate() { // check target is still alive // test the targeted entity is still alive - const sint32 hp = defender->getScores()._PhysicalScores[ SCORES::hit_points ].Current; - if (hp <= 0 ) + const sint32 ChaScore1 = defender->getScores()._PhysicalScores[ SCORES::cha_score1 ].Current; + if (ChaScore1 <= 0 ) { nlwarning(" Entity %s is dead", TheDataset.getEntityId(_Defender->getEntityRowId()).toString().c_str()); //errorCode = "BS_TARGET_DEAD"; @@ -655,14 +655,14 @@ bool CCombatPhrase::validate() if(!checkPhraseCost(errorCode)) { - if (!_NotEnoughStaminaMsg && errorCode == "EGS_TOO_EXPENSIVE_STAMINA") + if (!_NotEnoughChaScore2Msg && errorCode == "EGS_TOO_EXPENSIVE_ChaScore2") { - _NotEnoughStaminaMsg = true; + _NotEnoughChaScore2Msg = true; PHRASE_UTILITIES::sendSimpleMessage( _Attacker->getEntityRowId(), errorCode ); } - else if (!_NotEnoughHpMsg && errorCode == "EGS_TOO_EXPENSIVE_HP") + else if (!_NotEnoughChaScore1Msg && errorCode == "EGS_TOO_EXPENSIVE_ChaScore1") { - _NotEnoughHpMsg = true; + _NotEnoughChaScore1Msg = true; PHRASE_UTILITIES::sendSimpleMessage( _Attacker->getEntityRowId(), errorCode ); } _Idle = true; @@ -772,14 +772,14 @@ bool CCombatPhrase::update() string errorCode; if(!checkPhraseCost(errorCode)) { - if (!_NotEnoughStaminaMsg && errorCode == "EGS_TOO_EXPENSIVE_STAMINA" && !_Idle ) + if (!_NotEnoughChaScore2Msg && errorCode == "EGS_TOO_EXPENSIVE_ChaScore2" && !_Idle ) { - _NotEnoughStaminaMsg = true; + _NotEnoughChaScore2Msg = true; PHRASE_UTILITIES::sendSimpleMessage( _Attacker->getEntityRowId(), errorCode ); } - else if (!_NotEnoughHpMsg && errorCode == "EGS_TOO_EXPENSIVE_HP" && !_Idle ) + else if (!_NotEnoughChaScore1Msg && errorCode == "EGS_TOO_EXPENSIVE_ChaScore1" && !_Idle ) { - _NotEnoughHpMsg = true; + _NotEnoughChaScore1Msg = true; PHRASE_UTILITIES::sendSimpleMessage( _Attacker->getEntityRowId(), errorCode ); } _Idle = true; @@ -873,7 +873,7 @@ void CCombatPhrase::apply() return; } - // spend stamina, hp + // spend ChaScore2, ChaScore1 CEntityBase* actingEntity = PHRASE_UTILITIES::entityPtrFromId( _Attacker->getEntityRowId() ); if (actingEntity == NULL) { @@ -909,21 +909,21 @@ void CCombatPhrase::apply() _AiEventReport.Type = ACTNATURE::OFFENSIVE; - if (_StaminaCost != 0) + if (_ChaScore2Cost != 0) { - SCharacteristicsAndScores &stamina = actingEntity->getScores()._PhysicalScores[SCORES::stamina]; - if ( stamina.Current != 0 ) + SCharacteristicsAndScores &ChaScore2 = actingEntity->getScores()._PhysicalScores[SCORES::cha_score2]; + if ( ChaScore2.Current != 0 ) { -// nlinfo("Stamina current = %d, cost %d", stamina.Current.getValue(), _StaminaCost); - stamina.Current = stamina.Current - _StaminaCost; - if (stamina.Current < 0) - stamina.Current = 0; +// nlinfo("ChaScore2 current = %d, cost %d", ChaScore2.Current.getValue(), _ChaScore2Cost); + ChaScore2.Current = ChaScore2.Current - _ChaScore2Cost; + if (ChaScore2.Current < 0) + ChaScore2.Current = 0; } } - if ( _HPCost != 0) + if ( _ChaScore1Cost != 0) { - actingEntity->changeCurrentHp( (_HPCost) * (-1) ); + actingEntity->changeCurrentChaScore1( (_ChaScore1Cost) * (-1) ); } CCombatWeapon weapon; @@ -1212,9 +1212,9 @@ void CCombatPhrase::apply() { applyCombatActions(); - _ExecutionBehaviour.DeltaHP = (sint16)((-1)*damage); + _ExecutionBehaviour.DeltaChaScore1 = (sint16)((-1)*damage); - if ( defender->changeCurrentHp( (-1)*damage ) == true) + if ( defender->changeCurrentChaScore1( (-1)*damage ) == true) { // entity has been killed, change the bahaviour of the attacker to set the flag _ExecutionBehaviour.Combat.KillingBlow = 1; @@ -1238,39 +1238,39 @@ void CCombatPhrase::apply() //PHRASE_UTILITIES::testSpellBreakOnDamage( _Defender->getEntityRowId(), _Attacker->getEntityRowId(), damage, damageType); // TODO - sint32 lostStamina = (sint32)( damage * _StaminaLossFactor + _StaminaLossModifier); - sint32 lostSap = (sint32)(damage * _SapLossFactor + _SapLossModifier); + sint32 lostChaScore2 = (sint32)(damage * _ChaScore2LossFactor + _ChaScore2LossModifier); + sint32 lostChaScore3 = (sint32)(damage * _ChaScore3LossFactor + _ChaScore3LossModifier); - if ( lostStamina != 0 ) + if ( lostChaScore2 != 0 ) { - INFOLOG("entity %s lose %d stamina", TheDataset.getEntityId(_Defender->getEntityRowId()).toString().c_str(),lostStamina ); - defender->getPhysScores()._PhysicalScores[SCORES::stamina].Current = defender->getPhysScores()._PhysicalScores[SCORES::stamina].Current - lostStamina; + INFOLOG("entity %s lose %d ChaScore2", TheDataset.getEntityId(_Defender->getEntityRowId()).toString().c_str(),lostChaScore2 ); + defender->getPhysScores()._PhysicalScores[SCORES::cha_score2].Current = defender->getPhysScores()._PhysicalScores[SCORES::cha_score2].Current - lostChaScore2; //TEMPFIX // clip score to 0 - if ( defender->getPhysScores()._PhysicalScores[SCORES::stamina].Current < 0 ) - defender->getPhysScores()._PhysicalScores[SCORES::stamina].Current = 0; + if ( defender->getPhysScores()._PhysicalScores[SCORES::cha_score2].Current < 0 ) + defender->getPhysScores()._PhysicalScores[SCORES::cha_score2].Current = 0; // add modifier to sentence AI event reports - _AiEventReport.addDelta(AI_EVENT_REPORT::Stamina, (-1)*lostStamina); + _AiEventReport.addDelta(AI_EVENT_REPORT::ChaScore2, (-1)*lostChaScore2); } - if ( lostSap != 0 ) + if ( lostChaScore3 != 0 ) { - //value = toString( _BaseSapAbsorption[i] ); - INFOLOG("entity %s lose %d sap", TheDataset.getEntityId(_Defender->getEntityRowId()).toString().c_str(), lostSap ); - defender->getPhysScores()._PhysicalScores[SCORES::sap].Current = defender->getPhysScores()._PhysicalScores[SCORES::sap].Current - lostSap; + //value = toString( _BaseChaScore3Absorption[i] ); + INFOLOG("entity %s lose %d ChaScore3", TheDataset.getEntityId(_Defender->getEntityRowId()).toString().c_str(), lostChaScore3 ); + defender->getPhysScores()._PhysicalScores[SCORES::cha_score3].Current = defender->getPhysScores()._PhysicalScores[SCORES::cha_score3].Current - lostChaScore3; //TEMPFIX // clip score to 0 - if ( defender->getPhysScores()._PhysicalScores[SCORES::sap].Current < 0 ) - defender->getPhysScores()._PhysicalScores[SCORES::sap].Current = 0; + if ( defender->getPhysScores()._PhysicalScores[SCORES::cha_score3].Current < 0 ) + defender->getPhysScores()._PhysicalScores[SCORES::cha_score3].Current = 0; // add modifier to sentence AI event reports - _AiEventReport.addDelta(AI_EVENT_REPORT::Sap, (-1)*lostSap); + _AiEventReport.addDelta(AI_EVENT_REPORT::ChaScore3, (-1)*lostChaScore3); } // send chat messages - PHRASE_UTILITIES::sendHitMessages(_Attacker->getEntityRowId(),_Defender->getEntityRowId(), damage, lostStamina, lostSap); + PHRASE_UTILITIES::sendHitMessages(_Attacker->getEntityRowId(),_Defender->getEntityRowId(), damage, lostChaScore2, lostChaScore3); if ( _ExecutionBehaviour.Combat.KillingBlow == 1 ) PHRASE_UTILITIES::sendDeathMessages( _Attacker->getEntityRowId(), _Defender->getEntityRowId() ); @@ -1299,7 +1299,7 @@ void CCombatPhrase::apply() // compute aggro sint32 aggro = 0; - const sint32 maxPv = defender->getPhysScores()._PhysicalScores[SCORES::hit_points].Max; + const sint32 maxPv = defender->getPhysScores()._PhysicalScores[SCORES::cha_score1].Max; if (maxPv) { aggro = (-1) * sint32((100.0 * double(damage + _AggroModifier))/double(maxPv) * _AggroMultiplier) ; @@ -1308,7 +1308,7 @@ void CCombatPhrase::apply() // update the repor _AiEventReport.AggroMul = 1.0f; _AiEventReport.AggroAdd = aggro; - _AiEventReport.addDelta(AI_EVENT_REPORT::HitPoints, (-1)*damage); + _AiEventReport.addDelta(AI_EVENT_REPORT::ChaScore1, (-1)*damage); PhraseManager->addAiEventReport(_AiEventReport); @@ -1502,17 +1502,17 @@ bool CCombatPhrase::checkPhraseCost( string &errorCode ) if ( TheDataset.getEntityId(_Attacker->getEntityRowId()).getType() != RYZOMID::player) return true; - const SCharacteristicsAndScores &stamina = _Attacker->getEntity()->getScores()._PhysicalScores[SCORES::stamina]; - if ( stamina.Current < _StaminaCost) + const SCharacteristicsAndScores &ChaScore2 = _Attacker->getEntity()->getScores()._PhysicalScores[SCORES::cha_score2]; + if ( ChaScore2.Current < _ChaScore2Cost) { - errorCode = "EGS_TOO_EXPENSIVE_STAMINA"; + errorCode = "EGS_TOO_EXPENSIVE_ChaScore2"; return false; } - const SCharacteristicsAndScores &hp = _Attacker->getEntity()->getScores()._PhysicalScores[SCORES::hit_points]; - if ( hp.Current < _HPCost) + const SCharacteristicsAndScores &ChaScore1 = _Attacker->getEntity()->getScores()._PhysicalScores[SCORES::cha_score1]; + if ( ChaScore1.Current < _ChaScore1Cost) { - errorCode = "EGS_TOO_EXPENSIVE_HP"; + errorCode = "EGS_TOO_EXPENSIVE_ChaScore1"; return false; } diff --git a/code/ryzom/server/src/sabrina/combat_phrase.h b/code/ryzom/server/src/sabrina/combat_phrase.h index bd6b198b2..66a22223a 100644 --- a/code/ryzom/server/src/sabrina/combat_phrase.h +++ b/code/ryzom/server/src/sabrina/combat_phrase.h @@ -35,8 +35,8 @@ /* Brick parameters - cr_sta:int_value - stamina cost to attacker - cr_hp:int_value - hp cost to attacker + cr_ChaScore2:int_value - ChaScore2 cost to attacker + cr_ChaScore1:int_value - ChaScore1 cost to attacker cr_t0:int_value - execution length modifier (in ticks) cr_t1:int_value - latency length modifier (in ticks) cr_open:str_name - constraint meaning action can only be performed when named condition is met @@ -49,10 +49,10 @@ skmat:int_value - attacker skill modifier (on attack) skmde:int_value - defender skill modifier (on defense) - absstar:float_value - ratio of absorbed stamina on target(s) (relative to damage on hps) - absstam:int_value - modifier on absorbed stamina on target(s) - abssapr:float_value - ratio of absorbed sap on target(s) (relative to damage on hps) - abssapm:int_value - modifier on absorbed sap on target(s) + absChaScore2r:float_value - ratio of absorbed ChaScore2 on target(s) (relative to damage on hps) + absChaScore2m:int_value - modifier on absorbed ChaScore2 on target(s) + absChaScore3r:float_value - ratio of absorbed ChaScore3 on target(s) (relative to damage on hps) + absChaScore3m:int_value - modifier on absorbed ChaScore3 on target(s) lapr:float_value - light armor protection ratio (after all computing) (1.0 = default; 1.2 = +20% ; 0.6 = -40%) mapr:float_value - medium armor protection ratio (after all computing) (1.0 = default; 1.2 = +20% ; 0.6 = -40%) @@ -86,12 +86,12 @@ :int_value - duration of the slow (in ticks) :int_value - duration of the slow when resisted (in ticks) - ef:vamphp - :float_value - ratio of the hp lost by the target that are given to the attacker (vampire effect) - ef:vampsta - :float_value - ratio of the stamina lost by the target that are given to the attacker (vampire effect) - ef:vampsap - :float_value - ratio of the sap lost by the target that are given to the attacker (vampire effect) + ef:vampChaScore1 + :float_value - ratio of the ChaScore1 lost by the target that are given to the attacker (vampire effect) + ef:vampChaScore2 + :float_value - ratio of the ChaScore2 lost by the target that are given to the attacker (vampire effect) + ef:vampChaScore3 + :float_value - ratio of the ChaScore3 lost by the target that are given to the attacker (vampire effect) ef:hrmde :int_value - Hit Rate Modifier for the defender (in ticks) @@ -106,24 +106,24 @@ ef:bleed :int_value - duration of the bleed effect :int_value - duration of the bleed effect if resisted - :int_value - nb of hp lost each repeat by the target - :int_value - nb of hp lost each repeat by the target if resisted + :int_value - nb of ChaScore1 lost each repeat by the target + :int_value - nb of ChaScore1 lost each repeat by the target if resisted :int_value - repeat rate of the bleed effect (every x ticks) :int_value - repeat rate of the bleed effect when resisted (every x ticks) ef:poison :int_value - duration of the poison effect :int_value - duration of the poison effect if resisted - :int_value - nb of hp lost each repeat by the target - :int_value - nb of hp lost each repeat by the target if resisted + :int_value - nb of ChaScore1 lost each repeat by the target + :int_value - nb of ChaScore1 lost each repeat by the target if resisted :int_value - repeat rate of the poison effect (every x ticks) :int_value - repeat rate of the poison effect when resisted (every x ticks) ef:disease :int_value - duration of the disease effect :int_value - duration of the disease effect if resisted - :int_value - nb of hp lost each repeat by the target - :int_value - nb of hp lost each repeat by the target if resisted + :int_value - nb of ChaScore1 lost each repeat by the target + :int_value - nb of ChaScore1 lost each repeat by the target if resisted :int_value - repeat rate of the disease effect (every x ticks) :int_value - repeat rate of the disease effect when resisted (every x ticks) @@ -305,11 +305,11 @@ protected: // total credit (sabrina system) uint16 _SabrinaCredit; - /// stamina cost of the attack - sint32 _StaminaCost; + /// ChaScore2 cost of the attack + sint32 _ChaScore2Cost; - // hp cost - sint32 _HPCost; + // ChaScore1 cost + sint32 _ChaScore1Cost; /// execution length modifier (in ticks) sint32 _ExecutionLengthModifier; @@ -335,14 +335,14 @@ protected: /// repeat mode on/off bool _CyclicPhrase; - /// stamina loss factor - float _StaminaLossFactor; - /// stamina loss modifier - uint32 _StaminaLossModifier; - /// sap loss factor - float _SapLossFactor; - /// sap loss modifier - uint32 _SapLossModifier; + /// ChaScore2 loss factor + float _ChaScore2LossFactor; + /// ChaScore2 loss modifier + uint32 _ChaScore2LossModifier; + /// ChaScore3 loss factor + float _ChaScore3LossFactor; + /// ChaScore3 loss modifier + uint32 _ChaScore3LossModifier; /// opening needed std::string _Opening; @@ -415,9 +415,9 @@ protected: /// already sent a target too far message since last strike bool _TargetTooFarMsg; /// - bool _NotEnoughHpMsg; + bool _NotEnoughChaScore1Msg; /// - bool _NotEnoughStaminaMsg; + bool _NotEnoughChaScore2Msg; /// is current target valid ? bool _CurrentTargetIsValid; /// melee or range combat diff --git a/code/ryzom/server/src/sabrina/faber_phrase.cpp b/code/ryzom/server/src/sabrina/faber_phrase.cpp index 94943ffc8..a93284196 100644 --- a/code/ryzom/server/src/sabrina/faber_phrase.cpp +++ b/code/ryzom/server/src/sabrina/faber_phrase.cpp @@ -39,8 +39,8 @@ CFaberPhrase::CFaberPhrase() _FaberAction = 0; _SabrinaCost = 0; _SabrinaCredit = 0; - _StaminaCost = 0; - _HPCost = 0; + _ChaScore2Cost = 0; + _ChaScore1Cost = 0; _FaberTime = 0; _RootFaberPlan = 0; _Tool = 0; @@ -89,15 +89,15 @@ bool CFaberPhrase::build( const TDataSetRow & actorRowId, const std::vector< con { switch(brick.Params[i]->id()) { - case TBrickParam::SAP: + case TBrickParam::ChaScore3: return false; - case TBrickParam::HP: - INFOLOG("HP: %i",((CSBrickParamHp *)brick.Params[i])->Hp); - _HPCost += ((CSBrickParamHp *)brick.Params[i])->Hp; + case TBrickParam::ChaScore1: + INFOLOG("ChaScore1: %i",((CSBrickParamChaScore1 *)brick.Params[i])->ChaScore1); + _ChaScore1Cost += ((CSBrickParamChaScore1 *)brick.Params[i])->ChaScore1; break; - case TBrickParam::STA: - INFOLOG("STA: %i",((CSBrickParamSta *)brick.Params[i])->Sta); - _StaminaCost += ((CSBrickParamSta *)brick.Params[i])->Sta; + case TBrickParam::ChaScore2: + INFOLOG("ChaScore2: %i",((CSBrickParamChaScore2 *)brick.Params[i])->ChaScore2); + _ChaScore2Cost += ((CSBrickParamChaScore2 *)brick.Params[i])->ChaScore2; break; default: // unused param ? @@ -144,19 +144,19 @@ bool CFaberPhrase::validate() return false; } CEntityBase * entity = CEntityBaseManager::getEntityBasePtr( _ActorRowId ); - const sint32 hp = entity->getScores()._PhysicalScores[ SCORES::hit_points ].Current; - if ( hp < _HPCost ) + const sint32 ChaScore1 = entity->getScores()._PhysicalScores[ SCORES::cha_score1 ].Current; + if ( ChaScore1 < _ChaScore1Cost ) { ///\todo alain : send message return false; } - const sint32 sta = entity->getScores()._PhysicalScores[ SCORES::stamina ].Current; - if ( sta < _StaminaCost ) + const sint32 ChaScore2 = entity->getScores()._PhysicalScores[ SCORES::cha_score2 ].Current; + if ( ChaScore2 < _ChaScore2Cost ) { ///\todo alain : send message return false; } - if (hp <= 0 || entity->getMode()==MBEHAV::DEATH) + if (ChaScore1 <= 0 || entity->getMode()==MBEHAV::DEATH) { ///\todo alain : send message return false; @@ -225,20 +225,20 @@ void CFaberPhrase::apply() nlwarning(" Invalid entity Id %s", TheDataset.getEntityId(_ActorRowId).toString().c_str() ); return; } - RY_GAME_SHARE::SCharacteristicsAndScores &sta = entity->getScores()._PhysicalScores[SCORES::stamina]; - if ( sta.Current != 0) + RY_GAME_SHARE::SCharacteristicsAndScores &ChaScore2 = entity->getScores()._PhysicalScores[SCORES::cha_score2]; + if ( ChaScore2.Current != 0) { - sta.Current = sta.Current - _StaminaCost; - if (sta.Current < 0) - sta.Current = 0; + ChaScore2.Current = ChaScore2.Current - _ChaScore2Cost; + if (ChaScore2.Current < 0) + ChaScore2.Current = 0; } - RY_GAME_SHARE::SCharacteristicsAndScores &hp = entity->getScores()._PhysicalScores[SCORES::hit_points]; - if ( hp.Current != 0) + RY_GAME_SHARE::SCharacteristicsAndScores &ChaScore1 = entity->getScores()._PhysicalScores[SCORES::cha_score1]; + if ( ChaScore1.Current != 0) { - hp.Current = hp.Current - _HPCost; - if (hp.Current < 0) - hp.Current = 0; + ChaScore1.Current = ChaScore1.Current - _ChaScore1Cost; + if (ChaScore1.Current < 0) + ChaScore1.Current = 0; } // apply action of the sentence diff --git a/code/ryzom/server/src/sabrina/faber_phrase.h b/code/ryzom/server/src/sabrina/faber_phrase.h index bba3c565d..de4e5d36c 100644 --- a/code/ryzom/server/src/sabrina/faber_phrase.h +++ b/code/ryzom/server/src/sabrina/faber_phrase.h @@ -113,10 +113,10 @@ private: sint32 _SabrinaCost; /// total credit (sabrina system) sint32 _SabrinaCredit; - /// stamina cost of the faber action - sint32 _StaminaCost; - /// hp cost - sint32 _HPCost; + /// ChaScore2 cost of the faber action + sint32 _ChaScore2Cost; + /// ChaScore1 cost + sint32 _ChaScore1Cost; /// faber time in ticks NLMISC::TGameCycle _FaberTime; diff --git a/code/ryzom/server/src/sabrina/harvest_phrase.cpp b/code/ryzom/server/src/sabrina/harvest_phrase.cpp index 06944d7f6..dda6e90b3 100644 --- a/code/ryzom/server/src/sabrina/harvest_phrase.cpp +++ b/code/ryzom/server/src/sabrina/harvest_phrase.cpp @@ -43,8 +43,8 @@ CHarvestPhrase::CHarvestPhrase() { _SabrinaCost = 0; _SabrinaCredit = 0; - _StaminaCost = 0; - _HPCost = 0; + _ChaScore2Cost = 0; + _ChaScore1Cost = 0; _HarvestTime = 25; // 2.5s for DEBUG ONLY // _HarvestTime = 0; // 0s for DEBUG ONLY _IsStatic = true; @@ -83,15 +83,15 @@ bool CHarvestPhrase::build( const TDataSetRow & actorRowId, const std::vector< c { switch(brick.Params[i]->id()) { - case TBrickParam::SAP: + case TBrickParam::ChaScore3: return false; - case TBrickParam::HP: - INFOLOG("HP: %i",((CSBrickParamHp *)brick.Params[i])->Hp); - _HPCost += ((CSBrickParamHp *)brick.Params[i])->Hp; + case TBrickParam::ChaScore1: + INFOLOG("ChaScore1: %i",((CSBrickParamChaScore1 *)brick.Params[i])->ChaScore1); + _ChaScore1Cost += ((CSBrickParamChaScore1 *)brick.Params[i])->ChaScore1; break; - case TBrickParam::STA: - INFOLOG("STA: %i",((CSBrickParamSta *)brick.Params[i])->Sta); - _StaminaCost += ((CSBrickParamSta *)brick.Params[i])->Sta; + case TBrickParam::ChaScore2: + INFOLOG("ChaScore2: %i",((CSBrickParamChaScore2 *)brick.Params[i])->ChaScore2); + _ChaScore2Cost += ((CSBrickParamChaScore2 *)brick.Params[i])->ChaScore2; break; default: // unused param ? @@ -130,19 +130,19 @@ bool CHarvestPhrase::validate() return false; } CEntityBase * entity = CEntityBaseManager::getEntityBasePtr( _ActorRowId ); - const sint32 hp = entity->getScores()._PhysicalScores[ SCORES::hit_points ].Current; - if ( hp < _HPCost ) + const sint32 ChaScore1 = entity->getScores()._PhysicalScores[ SCORES::cha_score1 ].Current; + if ( ChaScore1 < _ChaScore1 ) { ///\todo david : send message return false; } - const sint32 sta = entity->getScores()._PhysicalScores[ SCORES::stamina ].Current; - if ( sta < _StaminaCost ) + const sint32 ChaScore2 = entity->getScores()._PhysicalScores[ SCORES::cha_score2 ].Current; + if ( ChaScore2 < _ChaScore2 ) { ///\todo david : send message return false; } - if (hp <= 0 || entity->getMode()==MBEHAV::DEATH) + if (ChaScore1 <= 0 || entity->getMode()==MBEHAV::DEATH) { ///\todo david : send message return false; @@ -244,20 +244,20 @@ void CHarvestPhrase::apply() nlwarning(" Invalid entity Id %s", TheDataset.getEntityId(_ActorRowId).toString().c_str() ); return; } - RY_GAME_SHARE::SCharacteristicsAndScores &sta = entity->getScores()._PhysicalScores[SCORES::stamina]; - if ( sta.Current != 0) + RY_GAME_SHARE::SCharacteristicsAndScores &ChaScore2 = entity->getScores()._PhysicalScores[SCORES::cha_score2]; + if ( ChaScore2.Current != 0) { - sta.Current = sta.Current - _StaminaCost; - if (sta.Current < 0) - sta.Current = 0; + ChaScore2.Current = ChaScore2.Current - _ChaScore2Cost; + if (ChaScore2.Current < 0) + ChaScore2.Current = 0; } - RY_GAME_SHARE::SCharacteristicsAndScores &hp = entity->getScores()._PhysicalScores[SCORES::hit_points]; - if ( hp.Current != 0) + RY_GAME_SHARE::SCharacteristicsAndScores &ChaScore1 = entity->getScores()._PhysicalScores[SCORES::cha_score1]; + if ( ChaScore1.Current != 0) { - hp.Current = hp.Current - _HPCost; - if (hp.Current < 0) - hp.Current = 0; + ChaScore1.Current = ChaScore1.Current - _ChaScore1Cost; + if (ChaScore1.Current < 0) + ChaScore1.Current = 0; } // Harvest the raw materials diff --git a/code/ryzom/server/src/sabrina/harvest_phrase.h b/code/ryzom/server/src/sabrina/harvest_phrase.h index 8ec5f5b3f..fc7ec9b19 100644 --- a/code/ryzom/server/src/sabrina/harvest_phrase.h +++ b/code/ryzom/server/src/sabrina/harvest_phrase.h @@ -111,10 +111,10 @@ private: sint32 _SabrinaCost; /// total credit (sabrina system) sint32 _SabrinaCredit; - /// stamina cost of the harvest action - sint32 _StaminaCost; - /// hp cost - sint32 _HPCost; + /// ChaScore2 cost of the harvest action + sint32 _ChaScore2Cost; + /// ChaScore1 cost + sint32 _ChaScore1Cost; /// harvest time in ticks NLMISC::TGameCycle _HarvestTime; diff --git a/code/ryzom/server/src/sabrina/magic_action_affect_stat.cpp b/code/ryzom/server/src/sabrina/magic_action_affect_stat.cpp index 97c7aed8a..fdf41f54a 100644 --- a/code/ryzom/server/src/sabrina/magic_action_affect_stat.cpp +++ b/code/ryzom/server/src/sabrina/magic_action_affect_stat.cpp @@ -158,12 +158,12 @@ protected: const std::vector< TDataSetRow > & targets = phrase->getTargets(); SCORES::TScores linkEnergy; - if ( phrase->getHPCost() > 0 ) + if ( phrase->getChaScore1Cost() > 0 ) { - linkEnergy = SCORES::hit_points; + linkEnergy = SCORES::cha_score1; } else - linkEnergy = SCORES::sap; + linkEnergy = SCORES::cha_score3; for ( uint i = 0; i < targets.size(); i++ ) { diff --git a/code/ryzom/server/src/sabrina/magic_action_attack.cpp b/code/ryzom/server/src/sabrina/magic_action_attack.cpp index 53c19c155..c64fcb074 100644 --- a/code/ryzom/server/src/sabrina/magic_action_attack.cpp +++ b/code/ryzom/server/src/sabrina/magic_action_attack.cpp @@ -39,7 +39,7 @@ class CMagicActionBasicDamage : public IMagicAction { public: CMagicActionBasicDamage() - :_DmgHp(0),_DmgSap(0),_DmgSta(0),_DmgType(DMGTYPE::UNDEFINED){} + :_DmgChaScore1(0),_DmgChaScore3(0),_DmgChaScore2(0),_DmgType(DMGTYPE::UNDEFINED){} protected: virtual bool addBrick( const CStaticBrick & brick, CMagicPhrase * phrase, bool &effectEnd ) { @@ -63,10 +63,10 @@ protected: break; case TBrickParam::MA_DMG: - INFOLOG("MA_DMG: %u %u %u",((CSBrickParamMagicDmg *)brick.Params[i])->Hp,((CSBrickParamMagicDmg *)brick.Params[i])->Sap,((CSBrickParamMagicDmg *)brick.Params[i])->Sta); - _DmgHp = ((CSBrickParamMagicDmg *)brick.Params[i])->Hp; - _DmgSap = ((CSBrickParamMagicDmg *)brick.Params[i])->Sap; - _DmgSta = ((CSBrickParamMagicDmg *)brick.Params[i])->Sta; + INFOLOG("MA_DMG: %u %u %u",((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore1,((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore3,((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore1); + _DmgChaScore1 = ((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore1; + _DmgChaScore3 = ((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore3; + _DmgChaScore2 = ((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore2; break; default: @@ -153,9 +153,9 @@ protected: if ( effect ) mult *= ( effect->getParamValue() / 100.0f ); - sint32 realDmgHp = sint32 ( _DmgHp * mult ); - realDmgHp = sint32( target->applyDamageOnArmor( _DmgType, realDmgHp ) ); - if ( target->changeCurrentHp( - realDmgHp ) ) + sint32 realDmgChaScore1 = sint32 ( _DmgChaScore1 * mult ); + realDmgChaScore1 = sint32( target->applyDamageOnArmor( _DmgType, realDmgChaScore1 ) ); + if ( target->changeCurrentChaScore1( - realDmgChaScore1 ) ) { // send mission event if ( actor->getId().getType()== RYZOMID::player ) @@ -164,72 +164,72 @@ protected: ((CCharacter*) actor)->processMissionEvent( event ); } } - if ( target->getScores()._PhysicalScores[SCORES::hit_points].Current <= 0) + if ( target->getScores()._PhysicalScores[SCORES::cha_score1].Current <= 0) { - target->getScores()._PhysicalScores[SCORES::hit_points].Current = 0; + target->getScores()._PhysicalScores[SCORES::cha_score1].Current = 0; //behav.Spell.KillingBlow = 1; } - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realDmgHp ,SCORES::hit_points , ACTNATURE::OFFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realDmgChaScore1 ,SCORES::cha_score1 , ACTNATURE::OFFENSIVE); - sint32 realDmgSap; + sint32 realDmgChaScore3; { - RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::sap]; - realDmgSap = sint32( _DmgSap * mult ); - realDmgSap = target->applyDamageOnArmor( _DmgType, realDmgSap ); - score.Current = score.Current - realDmgSap; + RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score3]; + realDmgChaScore3 = sint32( _DmgChaScore3 * mult ); + realDmgChaScore3 = target->applyDamageOnArmor( _DmgType, realDmgChaScore3 ); + score.Current = score.Current - realDmgChaScore3; if ( score.Current < 0) score.Current = 0; - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realDmgSap ,SCORES::sap , ACTNATURE::OFFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realDmgChaScore3 ,SCORES::cha_score3 , ACTNATURE::OFFENSIVE); } - sint32 realDmgSta; + sint32 realDmgChaScore2; { - RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::stamina]; - realDmgSta = sint32( _DmgSta * mult ); - realDmgSta = target->applyDamageOnArmor( _DmgType, realDmgSta ); - score.Current = score.Current - realDmgSta; + RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score2]; + realDmgChaScore2 = sint32( _DmgChaScore2 * mult ); + realDmgChaScore2 = target->applyDamageOnArmor( _DmgType, realDmgChaScore2 ); + score.Current = score.Current - realDmgChaScore2; if ( score.Current < 0) score.Current = 0; - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realDmgSta ,SCORES::stamina , ACTNATURE::OFFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realDmgChaScore2 ,SCORES::cha_score2 , ACTNATURE::OFFENSIVE); } ///\todo nico: real value behav.Spell.SpellIntensity = 5; // compute aggro - sint32 max = target->getPhysScores()._PhysicalScores[SCORES::hit_points].Max; + sint32 max = target->getPhysScores()._PhysicalScores[SCORES::cha_score1].Max; if (max) { - const sint32 aggro = (-1) * sint32((100.0 * float(realDmgHp))/float(max) ); + const sint32 aggro = (-1) * sint32((100.0 * float(realDmgChaScore1))/float(max) ); // update the report CAiEventReport report; report.AggroMul = 1.0f; report.AggroAdd = aggro; - report.addDelta(AI_EVENT_REPORT::HitPoints, (-1)*realDmgHp); + report.addDelta(AI_EVENT_REPORT::ChaScore1, (-1)*realDmgChaScore1); CPhraseManager::getInstance()->addAiEventReport(report); } - max = target->getPhysScores()._PhysicalScores[SCORES::sap].Max; + max = target->getPhysScores()._PhysicalScores[SCORES::cha_score3].Max; if (max) { - const sint32 aggro = (-1) * sint32((100.0 * float(realDmgSap))/float(max) ); + const sint32 aggro = (-1) * sint32((100.0 * float(realDmgChaScore3))/float(max) ); // update the report CAiEventReport report; report.AggroMul = 1.0f; report.AggroAdd = aggro; - report.addDelta(AI_EVENT_REPORT::Sap, (-1)*realDmgSap); + report.addDelta(AI_EVENT_REPORT::ChaScore3, (-1)*realDmgChaScore3); CPhraseManager::getInstance()->addAiEventReport(report); } - max = target->getPhysScores()._PhysicalScores[SCORES::stamina].Max; + max = target->getPhysScores()._PhysicalScores[SCORES::cha_score2].Max; if (max) { - const sint32 aggro = (-1) * sint32((100.0 * float(realDmgSta))/float(max) ); + const sint32 aggro = (-1) * sint32((100.0 * float(realDmgChaScore2))/float(max) ); // update the report CAiEventReport report; report.AggroMul = 1.0f; report.AggroAdd = aggro; - report.addDelta(AI_EVENT_REPORT::Stamina, (-1)*realDmgSta); + report.addDelta(AI_EVENT_REPORT::ChaScore2, (-1)*realDmgChaScore2); CPhraseManager::getInstance()->addAiEventReport(report); } } @@ -252,9 +252,9 @@ protected: } } DMGTYPE::EDamageType _DmgType; - sint32 _DmgHp; - sint32 _DmgSap; - sint32 _DmgSta; + sint32 _DmgChaScore1; + sint32 _DmgChaScore3; + sint32 _DmgChaScore2; }; BEGIN_MAGIC_ACTION_FACTORY(CMagicActionBasicDamage) ADD_MAGIC_ACTION_TYPE( "mto" ) diff --git a/code/ryzom/server/src/sabrina/magic_action_debuff.cpp b/code/ryzom/server/src/sabrina/magic_action_debuff.cpp index c9f5542f3..94f27ca9a 100644 --- a/code/ryzom/server/src/sabrina/magic_action_debuff.cpp +++ b/code/ryzom/server/src/sabrina/magic_action_debuff.cpp @@ -102,12 +102,12 @@ protected: return; SCORES::EScores linkEnergy; - if ( phrase->getSapCost() > 0 ) + if ( phrase->getChaScore3Cost() > 0 ) { - linkEnergy = SCORES::sap; + linkEnergy = SCORES::cha_score3; } else - linkEnergy = SCORES::hit_points;; + linkEnergy = SCORES::cha_score1;; for ( uint i = 0; i < targets.size(); i++ ) { // check target diff --git a/code/ryzom/server/src/sabrina/magic_action_dot.cpp b/code/ryzom/server/src/sabrina/magic_action_dot.cpp index 6116784bf..33a992616 100644 --- a/code/ryzom/server/src/sabrina/magic_action_dot.cpp +++ b/code/ryzom/server/src/sabrina/magic_action_dot.cpp @@ -37,7 +37,7 @@ class CMagicActionDot : public IMagicAction { public: CMagicActionDot() - :_DmgHp(0),_DmgSap(0),_DmgSta(0),_DmgType(DMGTYPE::UNDEFINED),_CostPerUpdate(0),_Power(0) {} + :_DmgChaScore1(0),_DmgChaScore3(0),_DmgChaScore2(0),_DmgType(DMGTYPE::UNDEFINED),_CostPerUpdate(0),_Power(0) {} protected: virtual bool addBrick( const CStaticBrick & brick, CMagicPhrase * phrase, bool &effectEnd ) { @@ -60,10 +60,10 @@ protected: break; case TBrickParam::MA_DMG: - INFOLOG("MA_DMG: %u %u %u",((CSBrickParamMagicDmg *)brick.Params[i])->Hp,((CSBrickParamMagicDmg *)brick.Params[i])->Sap,((CSBrickParamMagicDmg *)brick.Params[i])->Sta); - _DmgHp = ((CSBrickParamMagicDmg *)brick.Params[i])->Hp; - _DmgSap = ((CSBrickParamMagicDmg *)brick.Params[i])->Sap; - _DmgSta = ((CSBrickParamMagicDmg *)brick.Params[i])->Sta; + INFOLOG("MA_DMG: %u %u %u",((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore1,((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore3,((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore2); + _DmgChaScore1 = ((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore1; + _DmgChaScore3 = ((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore3; + _DmgChaScore2 = ((CSBrickParamMagicDmg *)brick.Params[i])->ChaScore2; break; case TBrickParam::MA_LINK_COST: @@ -116,12 +116,12 @@ protected: const std::vector< TDataSetRow > & targets = phrase->getTargets(); SCORES::TScores linkEnergy; - if ( phrase->getHPCost() > 0 ) + if ( phrase->getChaScore1Cost() > 0 ) { - linkEnergy = SCORES::hit_points; + linkEnergy = SCORES::cha_score1; } else - linkEnergy = SCORES::sap; + linkEnergy = SCORES::cha_score3; for ( uint i = 0; i < targets.size(); i++ ) { // check target @@ -148,9 +148,9 @@ protected: _Skill, _DmgType, _Power, - sint32(_DmgHp * successFactor* CSLinkEffect::getUpdatePeriod()), - sint32(_DmgSap * successFactor* CSLinkEffect::getUpdatePeriod()), - sint32(_DmgSta * successFactor* CSLinkEffect::getUpdatePeriod()) ); + sint32(_DmgChaScore1 * successFactor* CSLinkEffect::getUpdatePeriod()), + sint32(_DmgChaScore3 * successFactor* CSLinkEffect::getUpdatePeriod()), + sint32(_DmgChaScore2 * successFactor* CSLinkEffect::getUpdatePeriod()) ); actor->addLink( dot ); target->addSabrinaEffect( dot ); behav.Spell.SpellId = MAGICFX::toMagicFx( _DmgType ,false); @@ -158,9 +158,9 @@ protected: } } DMGTYPE::EDamageType _DmgType; - sint32 _DmgHp; - sint32 _DmgSap; - sint32 _DmgSta; + sint32 _DmgChaScore1; + sint32 _DmgChaScore3; + sint32 _DmgChaScore2; sint32 _CostPerUpdate; uint8 _Power; }; diff --git a/code/ryzom/server/src/sabrina/magic_action_heal.cpp b/code/ryzom/server/src/sabrina/magic_action_heal.cpp index b4b0a12aa..3d7a761c5 100644 --- a/code/ryzom/server/src/sabrina/magic_action_heal.cpp +++ b/code/ryzom/server/src/sabrina/magic_action_heal.cpp @@ -37,7 +37,7 @@ class CMagicActionBasicHeal : public IMagicAction { public: CMagicActionBasicHeal() - :_HealHp(0),_HealSap(0),_HealSta(0){} + :_HealChaScore1(0),_HealChaScore3(0),_HealChaScore2(0){} protected: virtual bool addBrick( const CStaticBrick & brick, CMagicPhrase * phrase, bool &effectEnd ) { @@ -50,10 +50,10 @@ protected: effectEnd = true; return true; case TBrickParam::MA_HEAL: - INFOLOG("MA_HEAL: %u %u %u",((CSBrickParamMagicHeal *)brick.Params[i])->Hp,((CSBrickParamMagicHeal *)brick.Params[i])->Sap,((CSBrickParamMagicHeal *)brick.Params[i])->Sta); - _HealHp = ((CSBrickParamMagicHeal *)brick.Params[i])->Hp; - _HealSap = ((CSBrickParamMagicHeal *)brick.Params[i])->Sap; - _HealSta = ((CSBrickParamMagicHeal *)brick.Params[i])->Sta; + INFOLOG("MA_HEAL: %u %u %u",((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore1,((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore3,((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore2); + _HealChaScore1 = ((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore1; + _HealChaScore3 = ((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore3; + _HealChaScore2 = ((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore2; default: // unused param, can be useful in the phrase @@ -116,61 +116,61 @@ protected: //behav.Spell.KillingBlow = 0; /// - sint32 realHealHp = 0; + sint32 realHealChaScore1 = 0; { - RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::hit_points]; - score.Current = score.Current + sint32(_HealHp * successFactor); + RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score1]; + score.Current = score.Current + sint32(_HealChaScore1 * successFactor); if ( score.Current >= score.Max ) { - realHealHp = sint32(_HealHp * successFactor) + score.Max - score.Current; - if ( realHealHp > 0) - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealHp,SCORES::hit_points , ACTNATURE::DEFENSIVE); + realHealChaScore1 = sint32(_HealChaScore1 * successFactor) + score.Max - score.Current; + if ( realHealChaScore1 > 0) + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealChaScore1,SCORES::cha_score1 , ACTNATURE::DEFENSIVE); score.Current = score.Max; } else - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealHp ,SCORES::hit_points , ACTNATURE::DEFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealChaScore1 ,SCORES::cha_score1 , ACTNATURE::DEFENSIVE); } - sint32 realHealSap = 0; + sint32 realHealChaScore3 = 0; { - RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::sap]; - score.Current = score.Current + sint32(_HealSap * successFactor); + RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score3]; + score.Current = score.Current + sint32(_HealChaScore3 * successFactor); if ( score.Current >= score.Max ) { - realHealSap = sint32(_HealSap * successFactor) + score.Max - score.Current; - if ( realHealSap > 0) - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealSap,SCORES::sap , ACTNATURE::DEFENSIVE); + realHealChaScore3 = sint32(_HealChaScore3 * successFactor) + score.Max - score.Current; + if ( realHealChaScore3 > 0) + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealChaScore3,SCORES::cha_score3 , ACTNATURE::DEFENSIVE); score.Current = score.Max; } else - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealSap ,SCORES::sap , ACTNATURE::DEFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealChaScore3 ,SCORES::cha_score3 , ACTNATURE::DEFENSIVE); } - sint32 realHealSta = 0; + sint32 realHealChaScore2 = 0; { - RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::stamina]; - score.Current = score.Current + sint32(_HealSta * successFactor); + RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score2]; + score.Current = score.Current + sint32(_HealChaScore2 * successFactor); if ( score.Current >= score.Max ) { - realHealSta = sint32(_HealSta * successFactor) + score.Max - score.Current; - if ( realHealSta > 0) - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealSta,SCORES::stamina , ACTNATURE::DEFENSIVE); + realHealChaScore2 = sint32(_HealChaScore2 * successFactor) + score.Max - score.Current; + if ( realHealChaScore2 > 0) + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealChaScore2,SCORES::cha_score2 , ACTNATURE::DEFENSIVE); score.Current = score.Max; } else - PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealSta ,SCORES::stamina , ACTNATURE::DEFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( actor, target, realHealChaScore2 ,SCORES::cha_score2 , ACTNATURE::DEFENSIVE); } - /*behav.Magic.ImpactIntensity = PHRASE_UTILITIES::getImpactIntensity( realHealHp ,targets[i],SCORES::hit_points); - behav.Magic.ImpactIntensity += PHRASE_UTILITIES::getImpactIntensity( realHealSap ,targets[i],SCORES::sap); - behav.Magic.ImpactIntensity = PHRASE_UTILITIES::getImpactIntensity( realHealSta ,targets[i],SCORES::stamina); + /*behav.Magic.ImpactIntensity = PHRASE_UTILITIES::getImpactIntensity( realHealChaScore1 ,targets[i],SCORES::cha_score1); + behav.Magic.ImpactIntensity += PHRASE_UTILITIES::getImpactIntensity( realHealChaScore3 ,targets[i],SCORES::cha_score3); + behav.Magic.ImpactIntensity = PHRASE_UTILITIES::getImpactIntensity( realHealChaScore2 ,targets[i],SCORES::cha_score2); */ behav.Spell.SpellIntensity = 5; - behav.Spell.SpellId = MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,false ); + behav.Spell.SpellId = MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,false ); } } } - sint32 _HealHp; - sint32 _HealSap; - sint32 _HealSta; + sint32 _HealChaScore1; + sint32 _HealChaScore3; + sint32 _HealChaScore2; }; BEGIN_MAGIC_ACTION_FACTORY(CMagicActionBasicHeal) diff --git a/code/ryzom/server/src/sabrina/magic_action_hot.cpp b/code/ryzom/server/src/sabrina/magic_action_hot.cpp index 1f11e64c6..d009aef7a 100644 --- a/code/ryzom/server/src/sabrina/magic_action_hot.cpp +++ b/code/ryzom/server/src/sabrina/magic_action_hot.cpp @@ -37,7 +37,7 @@ class CMagicActionHot : public IMagicAction { public: CMagicActionHot() - :_HealHp(0),_HealSap(0),_HealSta(0),_CostPerUpdate(0),_Power(0){} + :_HealChaScore1(0),_HealChaScore3(0),_HealChaScore2(0),_CostPerUpdate(0),_Power(0){} protected: virtual bool addBrick( const CStaticBrick & brick, CMagicPhrase * phrase, bool &effectEnd ) { @@ -51,10 +51,10 @@ protected: return true; case TBrickParam::MA_HEAL: - INFOLOG("MA_HEAL: %u %u %u",((CSBrickParamMagicHeal *)brick.Params[i])->Hp,((CSBrickParamMagicHeal *)brick.Params[i])->Sap,((CSBrickParamMagicHeal *)brick.Params[i])->Sta); - _HealHp = ((CSBrickParamMagicHeal *)brick.Params[i])->Hp; - _HealSap = ((CSBrickParamMagicHeal *)brick.Params[i])->Sap; - _HealSta = ((CSBrickParamMagicHeal *)brick.Params[i])->Sta; + INFOLOG("MA_HEAL: %u %u %u",((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore1,((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore3,((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore2); + _HealChaScore1 = ((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore1; + _HealChaScore3 = ((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore3; + _HealChaScore2 = ((CSBrickParamMagicHeal *)brick.Params[i])->ChaScore2; case TBrickParam::MA_LINK_COST: INFOLOG("MA_LINK_COST: %u",((CSBrickParamMagicLinkCost *)brick.Params[i])->Cost); @@ -98,12 +98,12 @@ protected: const std::vector< TDataSetRow > & targets = phrase->getTargets(); SCORES::TScores linkEnergy; - if ( phrase->getHPCost() > 0 ) + if ( phrase->getChaScore1Cost() > 0 ) { - linkEnergy = SCORES::hit_points; + linkEnergy = SCORES::cha_score1; } else - linkEnergy = SCORES::sap; + linkEnergy = SCORES::cha_score3; for ( uint i = 0; i < targets.size(); i++ ) { @@ -129,21 +129,21 @@ protected: linkEnergy, _Skill, _Power, - uint32(_HealHp * successFactor* CSLinkEffect::getUpdatePeriod()), - uint32(_HealSap * successFactor* CSLinkEffect::getUpdatePeriod()), - uint32(_HealSta * successFactor* CSLinkEffect::getUpdatePeriod()) ); + uint32(_HealChaScore1 * successFactor* CSLinkEffect::getUpdatePeriod()), + uint32(_HealChaScore3 * successFactor* CSLinkEffect::getUpdatePeriod()), + uint32(_HealChaScore2 * successFactor* CSLinkEffect::getUpdatePeriod()) ); actor->addLink( hot ); target->addSabrinaEffect( hot ); - behav.Spell.SpellId = MAGICFX::healtoMagicFx( _HealHp,_HealSap,_HealSta,true ); + behav.Spell.SpellId = MAGICFX::healtoMagicFx( _HealChaScore1,_HealChaScore3,_HealChaScore2,true ); } } } - sint32 _HealHp; - sint32 _HealSap; - sint32 _HealSta; + sint32 _HealChaScore1; + sint32 _HealChaScore3; + sint32 _HealChaScore2; uint _CostPerUpdate; uint8 _Power; }; diff --git a/code/ryzom/server/src/sabrina/magic_action_negative_effect.cpp b/code/ryzom/server/src/sabrina/magic_action_negative_effect.cpp index 09718ac26..efe138ff5 100644 --- a/code/ryzom/server/src/sabrina/magic_action_negative_effect.cpp +++ b/code/ryzom/server/src/sabrina/magic_action_negative_effect.cpp @@ -120,12 +120,12 @@ protected: const std::vector< TDataSetRow > & targets = phrase->getTargets(); SCORES::TScores linkEnergy; - if ( phrase->getHPCost() > 0 ) + if ( phrase->getChaScore1Cost() > 0 ) { - linkEnergy = SCORES::hit_points; + linkEnergy = SCORES::cha_score1; } else - linkEnergy = SCORES::sap; + linkEnergy = SCORES::cha_score3; for ( uint i = 0; i < targets.size(); i++ ) { diff --git a/code/ryzom/server/src/sabrina/magic_phrase.cpp b/code/ryzom/server/src/sabrina/magic_phrase.cpp index e21c83835..4dd887846 100644 --- a/code/ryzom/server/src/sabrina/magic_phrase.cpp +++ b/code/ryzom/server/src/sabrina/magic_phrase.cpp @@ -75,13 +75,13 @@ void CMagicPhrase::applyBrickParam( TBrickParam::IId * param ) INFOLOG("MA_CASTING_TIME: %f",((CSBrickParamCastingTime *)param)->CastingTime); _CastingTime += NLMISC::TGameCycle( ((CSBrickParamCastingTime *)param)->CastingTime / CTickEventHandler::getGameTimeStep() ); break; - case TBrickParam::HP: - INFOLOG("HP: %i",((CSBrickParamHp *)param)->Hp); - _HPCost += ((CSBrickParamHp *)param)->Hp; + case TBrickParam::ChaScore1: + INFOLOG("ChaScore1: %i",((CSBrickParamChaScore1 *)param)->ChaScore1); + _ChaScore1Cost += ((CSBrickParamChaScore1 *)param)->ChaScore1; break; - case TBrickParam::SAP: - INFOLOG("SAP: %i",((CSBrickParamSap *)param)->Sap); - _SapCost += ((CSBrickParamSap *)param)->Sap; + case TBrickParam::ChaScore3: + INFOLOG("ChaScore3: %i",((CSBrickParamChaScore3 *)param)->ChaScore3); + _ChaScore3 += ((CSBrickParamChaScore3 *)param)->ChaScore3; break; case TBrickParam::MA_RANGES: INFOLOG("MA_RANGES: %u",((CSBrickParamMagicRanges *)param)->RangeIndex); @@ -254,23 +254,23 @@ bool CMagicPhrase::validate() } // test caster scores - const sint32 hp = entity->getScores()._PhysicalScores[ SCORES::hit_points ].Current; - if (hp <= 0 || entity->getMode()==MBEHAV::DEATH) + const sint32 ChaScore1 = entity->getScores()._PhysicalScores[ SCORES::cha_score1 ].Current; + if (ChaScore1 <= 0 || entity->getMode()==MBEHAV::DEATH) { return false; } - if ( hp < _HPCost ) + if ( ChaScore1 < ChaScore1 ) { if ( entity->getId().getType() == RYZOMID::player ) - CCharacter::sendMessageToClient( entity->getId(),"MAGIC_LACK_HP" ); + CCharacter::sendMessageToClient( entity->getId(),"MAGIC_LACK_ChaScore1" ); return false; } - const sint32 sap = entity->getScores()._PhysicalScores[ SCORES::sap ].Current; - if ( sap < _SapCost ) + const sint32 ChaScore3 = entity->getScores()._PhysicalScores[ SCORES::ChaScore3 ].Current; + if ( ChaScore3 < _ChaScore3Cost ) { if ( entity->getId().getType() == RYZOMID::player ) - CCharacter::sendMessageToClient( entity->getId(),"MAGIC_LACK_SAP" ); + CCharacter::sendMessageToClient( entity->getId(),"MAGIC_LACK_ChaScore3" ); return false; } @@ -397,25 +397,25 @@ void CMagicPhrase::execute() //----------------------------------------------- void CMagicPhrase::apply() { - // spend sap, hp + // spend ChaScore3, ChaScore1 CEntityBase* entity = PHRASE_UTILITIES::entityPtrFromId( _ActorRowId ); if (entity == NULL) { nlwarning(" Invalid entity Id %s", TheDataset.getEntityId(_ActorRowId).toString().c_str() ); return; } - RY_GAME_SHARE::SCharacteristicsAndScores &sap = entity->getScores()._PhysicalScores[SCORES::sap]; - if ( _SapCost ) + RY_GAME_SHARE::SCharacteristicsAndScores &ChaScore3 = entity->getScores()._PhysicalScores[SCORES::cha_score3]; + if ( _ChaScore3Cost ) { - sap.Current = sap.Current - _SapCost; - if (sap.Current < 0) - sap.Current = 0; + ChaScore3.Current = ChaScore3.Current - _ChaScore3; + if (ChaScore3.Current < 0) + ChaScore3.Current = 0; } - RY_GAME_SHARE::SCharacteristicsAndScores &hp = entity->getScores()._PhysicalScores[SCORES::hit_points]; - if ( _HPCost != 0) + RY_GAME_SHARE::SCharacteristicsAndScores &ChaScore1 = entity->getScores()._PhysicalScores[SCORES::cha_score1]; + if ( _ChaScore1Cost != 0) { - entity->changeCurrentHp(-_HPCost); + entity->changeCurrentChaScore1(-_ChaScore1Cost); } // compute average skill value diff --git a/code/ryzom/server/src/sabrina/magic_phrase.h b/code/ryzom/server/src/sabrina/magic_phrase.h index 4d2e7758c..c00840128 100644 --- a/code/ryzom/server/src/sabrina/magic_phrase.h +++ b/code/ryzom/server/src/sabrina/magic_phrase.h @@ -45,7 +45,7 @@ public: /// ctor inline CMagicPhrase() - :CSPhrase(),_SabrinaCost(0),_SabrinaCredit(0),_SapCost(0),_HPCost(0),_RangeIndex(0), + :CSPhrase(),_SabrinaCost(0),_SabrinaCredit(0),_ChaScore3Cost(0),_ChaScore1Cost(0),_RangeIndex(0), _CastingTime(0),_Targets(1),_Nature(ACTNATURE::UNKNOWN),_Range( 0 ), _BreakResist(0),_ArmorCompensation(0) {} /// dtor @@ -55,8 +55,8 @@ public: //@{ inline uint16 getSabrinaCost() { return _SabrinaCost; } inline uint getNbActions() { return _Actions.size(); } - inline sint32 getSapCost() { return _SapCost; } - inline sint32 getHPCost() { return _HPCost; } + inline sint32 getChaScore3Cost() { return _ChaScore3Cost; } + inline sint32 getChaScore1Cost() { return _ChaScore1Cost; } inline const std::vector & getTargets() { return _Targets; } inline const TDataSetRow & getActor() { return _ActorRowId; } inline sint32 getBreakResist() { return _BreakResist; } @@ -108,10 +108,10 @@ private: uint16 _SabrinaCost; /// total credit (sabrina system) uint16 _SabrinaCredit; - /// sap cost of the attack - uint16 _SapCost; - /// hp cost - uint16 _HPCost; + /// ChaScore3 cost of the attack + uint16 _ChaScore3Cost; + /// ChaScore1 cost + uint16 _ChaScore1Cost; /// casting time in ticks NLMISC::TGameCycle _CastingTime; /// range index of the spell diff --git a/code/ryzom/server/src/sabrina/phrase_utilities_functions.cpp b/code/ryzom/server/src/sabrina/phrase_utilities_functions.cpp index f659f202f..1a99572bc 100644 --- a/code/ryzom/server/src/sabrina/phrase_utilities_functions.cpp +++ b/code/ryzom/server/src/sabrina/phrase_utilities_functions.cpp @@ -1041,18 +1041,18 @@ void sendDeathMessages( const NLMISC::CEntityId &killerId, const NLMISC::CEntity //-------------------------------------------------------------- // sendHitMessages() //-------------------------------------------------------------- -void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, sint32 amount, sint32 lostStamina, sint32 lostSap) +void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, sint32 amount, sint32 lostChaScore2, sint32 lostChaScore3) { // at least the victim or the agressor must be a player, otherwise do not send any messages if ( (aggressorId.getType() != RYZOMID::player) && ( victimId.getType() != RYZOMID::player )) return; - if ( !amount && !lostStamina && !lostSap) + if ( !amount && !lostChaScore2 && !lostChaScore3) return; amount = abs(amount); - lostStamina = abs(lostStamina); - lostSap = abs(lostSap); + lostChaScore2 = abs(lostChaScore2); + lostChaScore3 = abs(lostChaScore3); string msgName; @@ -1073,29 +1073,29 @@ void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, s sendMessageViaMirror ("IOS", msgAggressor); INFOLOG("send BS_YOU_HIT_EI with param e=%s and i=%i for entity %s",victimId.toString().c_str(), amount, aggressorId.toString().c_str()); - // lost stamina - if (lostStamina>0) + // lost ChaScore2 + if (lostChaScore2>0) { - msgName = "EGS_LOSE_STA_EI"; - CMessage msgSta("STATIC_STRING"); - msgSta.serial( const_cast (aggressorId) ); - msgSta.serialCont( excluded ); - msgSta.serial( msgName ); - msgSta.serial( const_cast (victimId) ); - msgSta.serial( lostStamina ); - sendMessageViaMirror ("IOS", msgSta); + msgName = "EGS_LOSE_ChaScore2_EI"; + CMessage msgChaScore2("STATIC_STRING"); + msgChaScore2.serial( const_cast (aggressorId) ); + msgChaScore2.serialCont( excluded ); + msgChaScore2.serial( msgName ); + msgChaScore2.serial( const_cast (victimId) ); + msgChaScore2.serial( lostChaScore2 ); + sendMessageViaMirror ("IOS", msgChaScore2); } - // lost sap - if (lostSap>0) + // lost ChaScore3 + if (lostChaScore3>0) { - msgName = "EGS_LOSE_SAP_EI"; - CMessage msgSap("STATIC_STRING"); - msgSap.serial( const_cast (aggressorId) ); - msgSap.serialCont( excluded ); - msgSap.serial( msgName ); - msgSap.serial( const_cast (victimId) ); - msgSap.serial( lostSap ); - sendMessageViaMirror ("IOS", msgSap); + msgName = "EGS_LOSE_ChaScore3_EI"; + CMessage msgChaScore3("STATIC_STRING"); + msgChaScore3.serial( const_cast (aggressorId) ); + msgChaScore3.serialCont( excluded ); + msgChaScore3.serial( msgName ); + msgChaScore.serial( const_cast (victimId) ); + msgChaScore.serial( lostChaScore3 ); + sendMessageViaMirror ("IOS", msgChaScore3); } } @@ -1116,29 +1116,29 @@ void sendHitMessages( const CEntityId &aggressorId, const CEntityId &victimId, s INFOLOG("send BS_HITS_YOU_EI with param e=%s and i=%i for entity %s",aggressorId.toString().c_str(), amount, victimId.toString().c_str()); - // lost stamina - if (lostStamina>0) + // lost ChaScore2 + if (lostChaScore2>0) { - msgName = "EGS_U_LOSE_STA_EI"; - CMessage msgSta("STATIC_STRING"); - msgSta.serial( const_cast (victimId) ); - msgSta.serialCont( excluded ); - msgSta.serial( msgName ); - msgSta.serial( const_cast (aggressorId) ); - msgSta.serial( lostStamina ); - sendMessageViaMirror ("IOS", msgSta); + msgName = "EGS_U_LOSE_ChaScore2_EI"; + CMessage msgChaScore2("STATIC_STRING"); + msgChaScore2.serial( const_cast (victimId) ); + msgChaScore2.serialCont( excluded ); + msgChaScore2.serial( msgName ); + msgChaScore2.serial( const_cast (aggressorId) ); + msgChaScore2.serial( lostChaScore2 ); + sendMessageViaMirror ("IOS", msgChaScore2); } - // lost sap - if (lostSap>0) + // lost ChaScore3 + if (lostChaScore3>0) { - msgName = "EGS_U_LOSE_SAP_EI"; - CMessage msgSap("STATIC_STRING"); - msgSap.serial( const_cast (victimId) ); - msgSap.serialCont( excluded ); - msgSap.serial( msgName ); - msgSap.serial( const_cast (aggressorId) ); - msgSap.serial( lostSap ); - sendMessageViaMirror ("IOS", msgSap); + msgName = "EGS_U_LOSE_ChaScore3_EI"; + CMessage msgChaScore3("STATIC_STRING"); + msgChaScore3.serial( const_cast (victimId) ); + msgChaScore3.serialCont( excluded ); + msgChaScore3.serial( msgName ); + msgChaScore3.serial( const_cast (aggressorId) ); + msgChaScore3.serial( lostChaScore3 ); + sendMessageViaMirror ("IOS", msgChaScore3); } } @@ -1844,17 +1844,17 @@ void sendScoreModifierSpellMessage( CEntityBase * aggressor, CEntityBase* victim case ACTNATURE::OFFENSIVE: switch(score) { - case SCORES::sap: - msgVictim = "MAGIC_U_SUFFER_OFFENSIVE_SPELL_E_SAP"; - msgAgressor = "MAGIC_U_CAST_OFFENSIVE_SPELL_E_SAP"; + case SCORES::cha_score3: + msgVictim = "MAGIC_U_SUFFER_OFFENSIVE_SPELL_E_ChaScore3"; + msgAgressor = "MAGIC_U_CAST_OFFENSIVE_SPELL_E_ChaScore3"; break; - case SCORES::stamina: - msgVictim = "MAGIC_U_SUFFER_OFFENSIVE_SPELL_E_STA"; - msgAgressor = "MAGIC_U_CAST_OFFENSIVE_SPELL_E_STA"; + case SCORES::cha_score2: + msgVictim = "MAGIC_U_SUFFER_OFFENSIVE_SPELL_E_ChaScore2"; + msgAgressor = "MAGIC_U_CAST_OFFENSIVE_SPELL_E_ChaScore2"; break; - case SCORES::hit_points: - msgVictim = "MAGIC_U_SUFFER_OFFENSIVE_SPELL_E_HP"; - msgAgressor = "MAGIC_U_CAST_OFFENSIVE_SPELL_E_HP"; + case SCORES::cha_score1: + msgVictim = "MAGIC_U_SUFFER_OFFENSIVE_SPELL_E_ChaScore1"; + msgAgressor = "MAGIC_U_CAST_OFFENSIVE_SPELL_E_ChaScore1"; break; default: nlwarning(" invalid scrore %s", SCORES::toString(score).c_str() ); @@ -1863,17 +1863,17 @@ void sendScoreModifierSpellMessage( CEntityBase * aggressor, CEntityBase* victim case ACTNATURE::DEFENSIVE: switch(score) { - case SCORES::sap: - msgVictim = "MAGIC_U_SUFFER_HEAL_SPELL_E_SAP"; - msgAgressor = "MAGIC_U_CAST_HEAL_SPELL_E_SAP"; + case SCORES::cha_score3: + msgVictim = "MAGIC_U_SUFFER_HEAL_SPELL_E_ChaScore3"; + msgAgressor = "MAGIC_U_CAST_HEAL_SPELL_E_ChaScore3"; break; - case SCORES::stamina: - msgVictim = "MAGIC_U_SUFFER_HEAL_SPELL_E_STA"; - msgAgressor = "MAGIC_U_CAST_HEAL_SPELL_E_STA"; + case SCORES::cha_score2: + msgVictim = "MAGIC_U_SUFFER_HEAL_SPELL_E_ChaScore2"; + msgAgressor = "MAGIC_U_CAST_HEAL_SPELL_E_ChaScore2"; break; - case SCORES::hit_points: - msgVictim = "MAGIC_U_SUFFER_HEAL_SPELL_E_HP"; - msgAgressor = "MAGIC_U_CAST_HEAL_SPELL_E_HP"; + case SCORES::cha_score1: + msgVictim = "MAGIC_U_SUFFER_HEAL_SPELL_E_ChaScore1"; + msgAgressor = "MAGIC_U_CAST_HEAL_SPELL_E_ChaScore1"; break; default: nlwarning(" invalid scrore %s", SCORES::toString(score).c_str() ); diff --git a/code/ryzom/server/src/sabrina/phrase_utilities_functions.h b/code/ryzom/server/src/sabrina/phrase_utilities_functions.h index 70628d3e2..51e66f686 100644 --- a/code/ryzom/server/src/sabrina/phrase_utilities_functions.h +++ b/code/ryzom/server/src/sabrina/phrase_utilities_functions.h @@ -332,16 +332,16 @@ inline void sendDeathMessages( const TDataSetRow &killerRowId, const TDataSetRow * \param victimId NLMISC::CEntityId of the victim entity * \param sentence pointer on the calling sentence if any * \param amount the amount of damage dealt to the victim entity - * \param lostStamina the amount of stamina lost by the victim entity - * \param lostSap the amount of sap lost by the victim entity + * \param lostChaScore2 the amount of ChaScore2 lost by the victim entity + * \param lostChaScore3 the amount of ChaScore3 lost by the victim entity */ -void sendHitMessages( const NLMISC::CEntityId &aggressorId, const NLMISC::CEntityId &victimId, sint32 amount, sint32 lostStamina = 0, sint32 lostSap = 0); +void sendHitMessages( const NLMISC::CEntityId &aggressorId, const NLMISC::CEntityId &victimId, sint32 amount, sint32 lostChaScore2 = 0, sint32 lostChaScore3 = 0); -inline void sendHitMessages( const TDataSetRow &aggressorRowId, const TDataSetRow &victimRowId, sint32 amount, sint32 lostStamina = 0, sint32 lostSap = 0) +inline void sendHitMessages( const TDataSetRow &aggressorRowId, const TDataSetRow &victimRowId, sint32 amount, sint32 lostChaScore2 = 0, sint32 lostChaScore3 = 0) { if (aggressorRowId.isValid() && TheDataset.isDataSetRowStillValid(aggressorRowId) && victimRowId.isValid() && TheDataset.isDataSetRowStillValid(victimRowId) ) { - sendHitMessages( TheDataset.getEntityId( aggressorRowId ), TheDataset.getEntityId( victimRowId ), amount, lostStamina, lostSap ); + sendHitMessages( TheDataset.getEntityId( aggressorRowId ), TheDataset.getEntityId( victimRowId ), amount, lostChaScore2, lostChaScore3 ); } } @@ -543,7 +543,7 @@ inline void sendCriticalHitMessage( const TDataSetRow &aggressorRowId, const TDa * \param score the affected score * \return the impact intensity */ -INTENSITY_TYPE::TImpactIntensity getImpactIntensity( sint32 impact, const TDataSetRow &victimRowId, SCORES::TScores score = SCORES::hit_points ); +INTENSITY_TYPE::TImpactIntensity getImpactIntensity( sint32 impact, const TDataSetRow &victimRowId, SCORES::TScores score = SCORES::cha_score1 ); /** * get the intensity of the attack diff --git a/code/ryzom/server/src/sabrina/s_link_effect_dot.cpp b/code/ryzom/server/src/sabrina/s_link_effect_dot.cpp index 5604a42de..7b982b22c 100644 --- a/code/ryzom/server/src/sabrina/s_link_effect_dot.cpp +++ b/code/ryzom/server/src/sabrina/s_link_effect_dot.cpp @@ -59,9 +59,9 @@ bool CSLinkEffectDot::update(uint32 & updateFlag) - sint32 realDmg = sint32( _DmgHp * mult ); + sint32 realDmg = sint32( _DmgChaScore1 * mult ); realDmg = target->applyDamageOnArmor( _DmgType, realDmg ); - if ( target->changeCurrentHp( - realDmg ) ) + if ( target->changeCurrentChaScore1( - realDmg ) ) { // send mission event if ( caster->getId().getType() == RYZOMID::player ) @@ -69,27 +69,27 @@ bool CSLinkEffectDot::update(uint32 & updateFlag) CMissionEventKill event ( target->getEntityRowId() ); ((CCharacter*) caster)->processMissionEvent( event ); } - PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster, target, realDmg ,SCORES::hit_points , ACTNATURE::OFFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster, target, realDmg ,SCORES::cha_score1 , ACTNATURE::OFFENSIVE); } { - RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::sap]; - realDmg = sint32( _DmgSap * mult ); + RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score3]; + realDmg = sint32( _DmgChaScore3 * mult ); realDmg = target->applyDamageOnArmor( _DmgType, realDmg ); score.Current = score.Current - realDmg; if ( score.Current <= 0) score.Current = 0; - PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster, target, realDmg ,SCORES::sap , ACTNATURE::OFFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster, target, realDmg ,SCORES::cha_score3 , ACTNATURE::OFFENSIVE); } { - RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::stamina]; - realDmg = sint32( _DmgSta * mult ); + RY_GAME_SHARE::SCharacteristicsAndScores &score = target->getScores()._PhysicalScores[SCORES::cha_score2]; + realDmg = sint32( _DmgChaScore2 * mult ); realDmg = target->applyDamageOnArmor( _DmgType, realDmg ); score.Current = score.Current - realDmg; if ( score.Current <= 0) score.Current = 0; - PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster, target, realDmg ,SCORES::stamina , ACTNATURE::OFFENSIVE); + PHRASE_UTILITIES::sendScoreModifierSpellMessage( caster, target, realDmg ,SCORES::cha_score2 , ACTNATURE::OFFENSIVE); } updateFlag |= _Family; diff --git a/code/ryzom/server/src/sabrina/s_link_effect_dot.h b/code/ryzom/server/src/sabrina/s_link_effect_dot.h index 801f700cd..b2934f4a7 100644 --- a/code/ryzom/server/src/sabrina/s_link_effect_dot.h +++ b/code/ryzom/server/src/sabrina/s_link_effect_dot.h @@ -33,10 +33,10 @@ public: SKILLS::ESkills skill, DMGTYPE::EDamageType dmgType, uint8 power, - sint32 dmgHp,sint32 dmgSap,sint32 dmgSta ) + sint32 dmgChaScore1,sint32 dmgChaScore3,sint32 dmgChaScore2 ) :CSLinkEffectOffensive ( creatorRowId,targetRowId,EFFECT_FAMILIES::Dot,cost,energyCost, skill, 0,power), _DmgType( dmgType ), - _DmgHp( dmgHp), _DmgSap( dmgSap), _DmgSta(dmgSta) + _DmgChaScore1( dmgChaScore1), _DmgChaScore3( dmgChaScore3), _DmgChaScore2(dmgChaScore2) { } @@ -52,9 +52,9 @@ public: protected: DMGTYPE::EDamageType _DmgType; - sint32 _DmgHp; - sint32 _DmgSap; - sint32 _DmgSta; + sint32 _DmgChaScore1; + sint32 _DmgChaScore3; + sint32 _DmgChaScore2; }; diff --git a/code/ryzom/server/src/sabrina/s_link_effect_hot.cpp b/code/ryzom/server/src/sabrina/s_link_effect_hot.cpp index a39ca720c..16ba06a5e 100644 --- a/code/ryzom/server/src/sabrina/s_link_effect_hot.cpp +++ b/code/ryzom/server/src/sabrina/s_link_effect_hot.cpp @@ -49,9 +49,9 @@ bool CSLinkEffectHot::update(uint32 & updateFlag) return true; } - applyOnScore( caster, target,SCORES::hit_points, _HealHp ); - applyOnScore( caster, target,SCORES::sap, _HealSta ); - applyOnScore( caster, target,SCORES::stamina, _HealSta ); + applyOnScore( caster, target,SCORES::cha_score1, _HealChaScore1 ); + applyOnScore( caster, target,SCORES::cha_score2, _HealChaScore2 ); + applyOnScore( caster, target,SCORES::cha_score3, _HealChaScore3 ); updateFlag |= _Family; return false; diff --git a/code/ryzom/server/src/sabrina/s_link_effect_hot.h b/code/ryzom/server/src/sabrina/s_link_effect_hot.h index 3cad2f15d..161da5d28 100644 --- a/code/ryzom/server/src/sabrina/s_link_effect_hot.h +++ b/code/ryzom/server/src/sabrina/s_link_effect_hot.h @@ -34,9 +34,9 @@ public: SCORES::TScores energyCost, SKILLS::ESkills skill, uint8 power, - sint32 healHp, sint32 healSap, sint32 healSta) + sint32 healChaScore1, sint32 healChaScore3, sint32 healChaScore2) :CSLinkEffect ( creatorRowId,targetRowId,EFFECT_FAMILIES::Hot,cost,energyCost,skill,0,power), - _HealHp(healHp),_HealSap(healSap),_HealSta(healSta) + _HealChaScore1(healChaScore1),_HealChaScore3(healChaScore3),_HealChaScore2(healChaScore2) { } @@ -48,9 +48,9 @@ public: protected: void applyOnScore( CEntityBase * caster, CEntityBase * target,SCORES::TScores scoreType, sint32 value ); - sint32 _HealHp; - sint32 _HealSap; - sint32 _HealSta; + sint32 _HealChaScore1; + sint32 _HealChaScore3; + sint32 _HealChaScore2; }; diff --git a/code/ryzom/server/src/sabrina/sabrina_actor.h b/code/ryzom/server/src/sabrina/sabrina_actor.h index bc474fc0a..f13d34d51 100644 --- a/code/ryzom/server/src/sabrina/sabrina_actor.h +++ b/code/ryzom/server/src/sabrina/sabrina_actor.h @@ -99,10 +99,10 @@ public: // eg: setup an event report record here virtual void cbSabrinaActionApplyBegin() {} - // apply damage (to hp, sap or sta) + // apply damage (to ChaScore1, ChaScore3 or ChaScore2) virtual void applyHeal(SABRINA::THealType healType, uint32 healQuantity)=0; - // apply damage (to hp, sap or sta) + // apply damage (to ChaScore1, ChaScore3 or ChaScore2) virtual void applyDamage(SABRINA::TDmgType damageType, uint32 damage)=0; // apply secondary effects (eg Stun, debuff, etc) diff --git a/code/ryzom/server/src/sabrina/sabrina_actor_creature.cpp b/code/ryzom/server/src/sabrina/sabrina_actor_creature.cpp index e06fef70d..c0dfe153f 100644 --- a/code/ryzom/server/src/sabrina/sabrina_actor_creature.cpp +++ b/code/ryzom/server/src/sabrina/sabrina_actor_creature.cpp @@ -134,7 +134,7 @@ void CSabrinaActorCreature::cbSabrinaActionApplyBegin() //------------------------------------------------------------------------------------------------------ void CSabrinaActorCreature::applyHeal(SABRINA::THealType healType,uint32 value) { -// apply damage (to hp, sap or sta) +// apply damage (to ChaScore1, ChaScore3 or ChaScore2) } //------------------------------------------------------------------------------------------------------ @@ -142,7 +142,7 @@ void CSabrinaActorCreature::applyHeal(SABRINA::THealType healType,uint32 value) //------------------------------------------------------------------------------------------------------ void CSabrinaActorCreature::applyDamage(SABRINA::TDmgType damageType, uint32 value) { -// apply damage (to hp, sap or sta) +// apply damage (to ChaScore1, ChaScore3 or ChaScore2) } //------------------------------------------------------------------------------------------------------ diff --git a/code/ryzom/server/src/sabrina/sabrina_actor_player.cpp b/code/ryzom/server/src/sabrina/sabrina_actor_player.cpp index 27c6e0740..9019004a0 100644 --- a/code/ryzom/server/src/sabrina/sabrina_actor_player.cpp +++ b/code/ryzom/server/src/sabrina/sabrina_actor_player.cpp @@ -94,7 +94,7 @@ void CSabrinaActorPlayer::cbSabrinaActionApplyBegin() void CSabrinaActorPlayer::applyHeal(SABRINA::THealType healType, uint32 healQuantity) { // TODO -// apply damage (to hp, sap or sta) +// apply damage (to ChaScore1, ChaScore3 or ChaScore2) } //------------------------------------------------------------------------------------------------------ @@ -103,7 +103,7 @@ void CSabrinaActorPlayer::applyHeal(SABRINA::THealType healType, uint32 healQuan void CSabrinaActorPlayer::applyDamage(SABRINA::TDmgType damageType, uint32 damage) { // TODO -// apply damage (to hp, sap or sta) +// apply damage (to ChaScore1, ChaScore3 or ChaScore2) } //------------------------------------------------------------------------------------------------------ diff --git a/code/ryzom/server/src/sabrina/sabrina_enum.h b/code/ryzom/server/src/sabrina/sabrina_enum.h index 359681db6..50848ff15 100644 --- a/code/ryzom/server/src/sabrina/sabrina_enum.h +++ b/code/ryzom/server/src/sabrina/sabrina_enum.h @@ -24,7 +24,7 @@ namespace SABRINA // type of healing to apply enum THealType { - HealUnknown, HealHP, HealSap, HealSta, HealFocus, + HealUnknown, HealChaScore1, HealChaScore3, HealChaScore2, HealChaScore4, }; // types of damage to apply @@ -36,7 +36,7 @@ namespace SABRINA DmgFire, DmgPoison, DmgElectric, DmgShock, // energy damage types - DmgSap, DmgStamina, + DmgChaScore3, DmgChaScore2, // damage to armor or equipment *** see SLOT_EQUIPMENT::TSlotEquipment *** for correct order *** DmgRightHandItem, DmgLeftHandItem, @@ -51,9 +51,9 @@ namespace SABRINA SuccessNormal, SuccessCritical, - FailInsufficientHP, // not enough HP to pay couterpart - FailInsufficientSap, // not enough Sap to pay couterpart - FailInsufficientStamina, // not enough Sta to pay couterpart + FailInsufficientChaScore1, // not enough ChaScore1 to pay couterpart + FailInsufficientChaScore3, // not enough ChaScore3 to pay couterpart + FailInsufficientChaSCore2, // not enough ChaScore2 to pay couterpart FailTgtDead, // the target died FailTgtInaccessible, // the target teleported or became inaccessible FailIMoved, // the actor moved and invalidated their action diff --git a/code/ryzom/server/src/server_share/msg_ai_service.cpp b/code/ryzom/server/src/server_share/msg_ai_service.cpp index 34aa831e8..31655455f 100644 --- a/code/ryzom/server/src/server_share/msg_ai_service.cpp +++ b/code/ryzom/server/src/server_share/msg_ai_service.cpp @@ -31,10 +31,10 @@ void CQueryEgs::init() { #define InsertFun(X) _Funs.insert( std::make_pair(std::string(# X), X)); InsertFun(Name); - InsertFun(Hp); InsertFun(MaxHp); InsertFun(RatioHp); - InsertFun(Sap); InsertFun(MaxSap); InsertFun(RatioSap); - InsertFun(Stamina); InsertFun(MaxStamina); InsertFun(RatioStamina); - InsertFun(Focus); InsertFun(MaxFocus); InsertFun(RatioFocus); + InsertFun(ChaScore1); InsertFun(MaxChaScore1); InsertFun(RatioChaScore1); + InsertFun(ChaScore3); InsertFun(MaxChaScore3); InsertFun(RatioChaScore3); + InsertFun(ChaScore2); InsertFun(MaxChaScore2); InsertFun(RatioChaScore2); + InsertFun(ChaScore4); InsertFun(MaxChaScore4); InsertFun(RatioChaScore4); InsertFun(BestSkillLevel); InsertFun(Target); InsertFun(IsInInventory); InsertFun(KnowBrick); diff --git a/code/ryzom/server/src/server_share/msg_ai_service.h b/code/ryzom/server/src/server_share/msg_ai_service.h index 13c6a3423..b4190806f 100644 --- a/code/ryzom/server/src/server_share/msg_ai_service.h +++ b/code/ryzom/server/src/server_share/msg_ai_service.h @@ -603,20 +603,20 @@ public: }; //---------------------------------------------------------------------------- -// AIS -> EGS ais change creature Max HP +// AIS -> EGS ais change creature Max ChaScore1 //---------------------------------------------------------------------------- -class CChangeCreatureMaxHPMsg : public CMirrorTransportClass +class CChangeCreatureMaxChaScore1Msg : public CMirrorTransportClass { public: std::vector Entities; - std::vector MaxHp; + std::vector MaxChaScore1; std::vector SetFull; virtual void description () { - className ("CChangeCreatureMaxHPMsg"); + className ("CChangeCreatureMaxChaScore1Msg"); propertyCont ("Entities", PropDataSetRow, Entities); - propertyCont ("MaxHp", PropUInt32, MaxHp); + propertyCont ("MaxChaScore1", PropUInt32, MaxChaScore1); propertyCont ("SetFull", PropUInt8, SetFull); } @@ -624,19 +624,19 @@ public: }; //---------------------------------------------------------------------------- -// AIS -> EGS ais change creature HP +// AIS -> EGS ais change creature ChaScore1 //---------------------------------------------------------------------------- -class CChangeCreatureHPMsg : public CMirrorTransportClass +class CChangeCreatureChaScore1Msg : public CMirrorTransportClass { public: std::vector Entities; - std::vector DeltaHp; + std::vector DeltaChaScore1; virtual void description () { - className ("CChangeCreatureHPMsg"); + className ("CChangeCreatureChaScore1Msg"); propertyCont ("Entities", PropDataSetRow, Entities); - propertyCont ("DeltaHp", PropSInt32, DeltaHp); + propertyCont ("DeltaChaScore1", PropSInt32, DeltaChaScore1); } virtual void callback (const std::string &/* name */, NLNET::TServiceId /* id */) {} @@ -1100,10 +1100,10 @@ public: enum TFunEnum { Name, - Hp, MaxHp, RatioHp, - Sap, MaxSap, RatioSap, - Stamina, MaxStamina, RatioStamina, - Focus, MaxFocus, RatioFocus, + ChaScore1, MaxChaScore1, RatioChaScore1, + ChaScore3, MaxChaScore3, RatioChaScore3, + ChaScore2, MaxChaScore2, RatioChaScore2, + ChaScore4, MaxChaScore4, RatioChaScore4, BestSkillLevel, Target, IsInInventory, KnowBrick, diff --git a/code/ryzom/server/src/server_share/testing_tool_structures.h b/code/ryzom/server/src/server_share/testing_tool_structures.h index dfb98079f..3e0b02bb1 100644 --- a/code/ryzom/server/src/server_share/testing_tool_structures.h +++ b/code/ryzom/server/src/server_share/testing_tool_structures.h @@ -34,9 +34,9 @@ struct SActorBeginTest { // uint16 Role; // uint16 Level; - sint32 Hp; - sint32 Sta; - sint32 Sap; + sint32 ChaScore1; + sint32 ChaScore2; + sint32 ChaScore3; NLMISC::CSheetId Armor; uint16 ArmorQuality; NLMISC::CSheetId RightHand; @@ -51,9 +51,9 @@ struct SActorBeginTest { // f.serial( Role ); // f.serial( Level ); - f.serial( Hp ); - f.serial( Sta ); - f.serial( Sap ); + f.serial( ChaScore1 ); + f.serial( ChaScore2 ); + f.serial( ChaScore3 ); f.serial( Armor ); f.serial( ArmorQuality ); f.serial( RightHand ); @@ -81,14 +81,14 @@ struct SLogReport uint16 Localized; // uint32 ShieldAbsorption; // uint32 ArmorAbsorption; // - uint32 HpLost; // + uint32 ChaScore1Lost; // bool SpecialEffectResist; uint16 SpecialEffectStart; uint32 SpecialEffectDuration; - uint32 UsedStamina; // - uint32 UsedSap; - uint32 StaminaLeft; // - uint32 SapLeft; + uint32 UsedChaScore2; // + uint32 UsedChaScore3; + uint32 ChaScore2Left; // + uint32 ChaScore3Left; void serial(NLMISC::IStream &f) throw(NLMISC::EStream) { @@ -105,14 +105,14 @@ struct SLogReport f.serial( Localized ); f.serial( ShieldAbsorption ); f.serial( ArmorAbsorption ); - f.serial( HpLost ); + f.serial( ChaScore1Lost ); f.serial( SpecialEffectResist ); f.serial( SpecialEffectStart ); f.serial( SpecialEffectDuration ); - f.serial( UsedStamina ); - f.serial( UsedSap ); - f.serial( StaminaLeft ); - f.serial( SapLeft ); + f.serial( UsedChaScore2 ); + f.serial( UsedChaScore3 ); + f.serial( ChaScore2Left ); + f.serial( ChaScore3Left ); } }; diff --git a/code/ryzom/server/src/simulation_service/simulated_dmc.cpp b/code/ryzom/server/src/simulation_service/simulated_dmc.cpp index 86e7810fc..27120ffef 100644 --- a/code/ryzom/server/src/simulation_service/simulated_dmc.cpp +++ b/code/ryzom/server/src/simulation_service/simulated_dmc.cpp @@ -452,11 +452,11 @@ void CDynamicMapClient::onNpcAnimationTargeted(uint32 mode) nlinfo("R2Cl: /a dssTaget AGGRO_RANGE_SMALL"); nlinfo("R2Cl: /a dssTaget AGGRO_RANGE_NONE"); } - if (mode & CAnimationProp::AddHp) + if (mode & CAnimationProp::AddChaScore1) { - nlinfo("R2Cl: /a dssTaget ADD_HP"); + nlinfo("R2Cl: /a dssTaget ADD_ChaScore1"); } } -*/ \ No newline at end of file +*/ diff --git a/code/ryzom/server/src/testing_tool_service/testing_tool_service.cpp b/code/ryzom/server/src/testing_tool_service/testing_tool_service.cpp index 996c838e2..0fc19f483 100644 --- a/code/ryzom/server/src/testing_tool_service/testing_tool_service.cpp +++ b/code/ryzom/server/src/testing_tool_service/testing_tool_service.cpp @@ -31,7 +31,6 @@ // Nel #include "nel/misc/sheet_id.h" #include "nel/misc/command.h" -#include "nel/misc/common.h" #include "nel/georges/u_form_elm.h" #include "nel/georges/u_form.h" #include "nel/georges/u_form_loader.h" @@ -271,7 +270,7 @@ void CTestingTool::startTestSession( const std::string& sheet ) //---------------------------------------------------------------- void CTestingTool::testSessionProceed() { - _TestSessionReport = nlfopen( "testSessionReport.txt", "w+t" ); + _TestSessionReport = fopen( "testSessionReport.txt", "w+t" ); fputs( "=====================================================================\n", _TestSessionReport ); fputs( "===================== NEW TEST SESSION STARTED ======================\n", _TestSessionReport ); @@ -354,7 +353,7 @@ void CTestingTool::testEnd() if ( _ActorsDeathFlags[_Actors[i].TargetIndex] ) _ActorsNbWin[i]++; } - +fl _CurrentIteration++; @@ -378,11 +377,11 @@ void CTestingTool::testEnd() // fputs( out.c_str(), _TestSessionReport ); // out = string("Level ") + NLMISC::toString( _ActorsBeginStats[i].Level ) + string("\n"); // fputs( out.c_str(), _TestSessionReport ); - out = string("Hp ") + NLMISC::toString( _ActorsBeginStats[i].Hp ) + string("\n"); + out = string("ChaScore1 ") + NLMISC::toString( _ActorsBeginStats[i].ChaScore1 ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string("Stamina ") + NLMISC::toString( _ActorsBeginStats[i].Sta ) + string("\n"); + out = string("ChaScore2 ") + NLMISC::toString( _ActorsBeginStats[i].ChaScore2 ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string("Sap ") + NLMISC::toString( _ActorsBeginStats[i].Sap ) + string("\n"); + out = string("ChaScore3 ") + NLMISC::toString( _ActorsBeginStats[i].ChaScore3 ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); out = string("Armor ") + _ActorsBeginStats[i].Armor.toString() + string(" Quality ") + NLMISC::toString( _ActorsBeginStats[i].ArmorQuality ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); @@ -439,19 +438,19 @@ void CTestingTool::testEnd() fputs( out.c_str(), _TestSessionReport ); out = string( " Effective damages: " ) + NLMISC::toString( _ActorsStats[i].SendDamage / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( " Final Hp Value: " ) + NLMISC::toString( _ActorsStats[i].FinalHp / _IterationCount ) + string( " stats: " ) + NLMISC::toString( 100.f * _ActorsStats[i].FinalHp / _ActorsBeginStats[i].Hp / _IterationCount ) + string( " %\n" ); + out = string( " Final ChaScore1 Value: " ) + NLMISC::toString( _ActorsStats[i].FinalChaScore1 / _IterationCount ) + string( " stats: " ) + NLMISC::toString( 100.f * _ActorsStats[i].FinalChaScore1 / _ActorsBeginStats[i].ChaScore1 / _IterationCount ) + string( " %\n" ); fputs( out.c_str(), _TestSessionReport ); - out = string( " Final Stamina Value: " ) + NLMISC::toString( _ActorsStats[i].FinalSta / _IterationCount ) + string( " stats: " ) + NLMISC::toString( 100.f * _ActorsStats[i].FinalSta / _ActorsBeginStats[i].Sta / _IterationCount ) + string( " %\n" ); + out = string( " Final ChaScore2 Value: " ) + NLMISC::toString( _ActorsStats[i].FinalChaScore2 / _IterationCount ) + string( " stats: " ) + NLMISC::toString( 100.f * _ActorsStats[i].FinalChaScore2 / _ActorsBeginStats[i].ChaScore2 / _IterationCount ) + string( " %\n" ); fputs( out.c_str(), _TestSessionReport ); - out = string( " Final Sap Value: " ) + NLMISC::toString( _ActorsStats[i].FinalSap / _IterationCount ) + string( " stats: " ) + NLMISC::toString( 100.f * _ActorsStats[i].FinalSap / _ActorsBeginStats[i].Sap / _IterationCount ) + string( " %\n" ); + out = string( " Final ChaScore3 Value: " ) + NLMISC::toString( _ActorsStats[i].FinalChaScore3 / _IterationCount ) + string( " stats: " ) + NLMISC::toString( 100.f * _ActorsStats[i].FinalChaScore3 / _ActorsBeginStats[i].ChaScore3 / _IterationCount ) + string( " %\n" ); fputs( out.c_str(), _TestSessionReport ); - out = string( " Ratio Stamina per gived damage: " ) + NLMISC::toString( 1.0f * ( _ActorsBeginStats[i].Sta - ( _ActorsStats[i].FinalSta / _IterationCount ) ) / ( _ActorsStats[i].GivenDamage / _IterationCount ) ) + string( "\n" ); + out = string( " Ratio ChaScore2 per gived damage: " ) + NLMISC::toString( 1.0f * ( _ActorsBeginStats[i].ChaScore2 - ( _ActorsStats[i].FinalChaScore2 / _IterationCount ) ) / ( _ActorsStats[i].GivenDamage / _IterationCount ) ) + string( "\n" ); fputs( out.c_str(), _TestSessionReport ); - out = string( " Ratio Sap per gived damage: " ) + NLMISC::toString( 1.0f * ( _ActorsBeginStats[i].Sap - ( _ActorsStats[i].FinalSap / _IterationCount ) ) / ( _ActorsStats[i].GivenDamage / _IterationCount ) ) + string( "\n" ); + out = string( " Ratio ChaScore3 per gived damage: " ) + NLMISC::toString( 1.0f * ( _ActorsBeginStats[i].ChaScore3 - ( _ActorsStats[i].FinalChaScore3 / _IterationCount ) ) / ( _ActorsStats[i].GivenDamage / _IterationCount ) ) + string( "\n" ); fputs( out.c_str(), _TestSessionReport ); - out = string( " Ratio Stamina per effective damage: " ) + NLMISC::toString( 1.0f * ( _ActorsBeginStats[i].Sta - ( _ActorsStats[i].FinalSta / _IterationCount ) ) / ( _ActorsStats[i].SendDamage / _IterationCount ) ) + string( "\n" ); + out = string( " Ratio ChaScore2 per effective damage: " ) + NLMISC::toString( 1.0f * ( _ActorsBeginStats[i].ChaScore2 - ( _ActorsStats[i].FinalChaScore2 / _IterationCount ) ) / ( _ActorsStats[i].SendDamage / _IterationCount ) ) + string( "\n" ); fputs( out.c_str(), _TestSessionReport ); - out = string( " Ratio Sap per effective damage: " ) + NLMISC::toString( ( 1.0f * _ActorsBeginStats[i].Sap - ( _ActorsStats[i].FinalSap / _IterationCount ) ) / ( _ActorsStats[i].SendDamage / _IterationCount ) ) + string( "\n" ); + out = string( " Ratio ChaScore3 per effective damage: " ) + NLMISC::toString( ( 1.0f * _ActorsBeginStats[i].ChaScore3 - ( _ActorsStats[i].FinalChaScore3 / _IterationCount ) ) / ( _ActorsStats[i].SendDamage / _IterationCount ) ) + string( "\n" ); fputs( out.c_str(), _TestSessionReport ); } @@ -473,9 +472,9 @@ void CTestingTool::testEnd() fputs( out.c_str(), _TestSessionReport ); out = string( "Total gived damage: " ) + NLMISC::toString( _ActorsSentence1[i].TotalGivenDamage / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Total Stamina consummate: " ) + NLMISC::toString( _ActorsSentence1[i].TotalStaminaConsume / _IterationCount ) + string("\n"); + out = string( "Total ChaScore2 consummate: " ) + NLMISC::toString( _ActorsSentence1[i].TotalChaScore2Consume / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Total Sap consummate: " ) + NLMISC::toString( _ActorsSentence1[i].TotalSapConsum / _IterationCount ) + string("\n"); + out = string( "Total ChaScore3 consummate: " ) + NLMISC::toString( _ActorsSentence1[i].TotalChaScore3Consume / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); if( _ActorsSentence1[i].NbSuccess ) @@ -492,17 +491,17 @@ void CTestingTool::testEnd() if( _ActorsSentence1[i].TotalGivenDamage ) { - out = string( "Stamina consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence1[i].TotalStaminaConsume / _ActorsSentence1[i].TotalGivenDamage ) + string("\n"); + out = string( "ChaScore2 consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence1[i].TotalChaScore2Consume / _ActorsSentence1[i].TotalGivenDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Sap consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence1[i].TotalSapConsum / _ActorsSentence1[i].TotalGivenDamage ) + string("\n"); + out = string( "ChaScore3 consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence1[i].TotalChaScore3Consume / _ActorsSentence1[i].TotalGivenDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); } if( _ActorsSentence1[i].TotalSendDamage ) { - out = string( "Stamina consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence1[i].TotalStaminaConsume / _ActorsSentence1[i].TotalSendDamage ) + string("\n"); + out = string( "ChaScore2 consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence1[i].TotalChaScore2Consume / _ActorsSentence1[i].TotalSendDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Sap consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence1[i].TotalSapConsum / _ActorsSentence1[i].TotalSendDamage ) + string("\n"); + out = string( "ChaScore3 consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence1[i].TotalChaScore3Consume / _ActorsSentence1[i].TotalSendDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); } @@ -517,9 +516,9 @@ void CTestingTool::testEnd() fputs( out.c_str(), _TestSessionReport ); out = string( "Total gived damage: " ) + NLMISC::toString( _ActorsSentence2[i].TotalGivenDamage / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Total Stamina consummate: " ) + NLMISC::toString( _ActorsSentence2[i].TotalStaminaConsume / _IterationCount ) + string("\n"); + out = string( "Total ChaScore2 consummate: " ) + NLMISC::toString( _ActorsSentence2[i].TotalChaScore2Consume / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Total Sap consummate: " ) + NLMISC::toString( _ActorsSentence2[i].TotalSapConsum / _IterationCount ) + string("\n"); + out = string( "Total ChaScore3 consummate: " ) + NLMISC::toString( _ActorsSentence2[i].TotalChaScore3Consume / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); if( _ActorsSentence2[i].NbSuccess ) @@ -536,17 +535,17 @@ void CTestingTool::testEnd() if( _ActorsSentence2[i].TotalGivenDamage ) { - out = string( "Stamina consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence2[i].TotalStaminaConsume / _ActorsSentence2[i].TotalGivenDamage ) + string("\n"); + out = string( "ChaScore2 consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence2[i].TotalChaScore2Consume / _ActorsSentence2[i].TotalGivenDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Sap consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence2[i].TotalSapConsum / _ActorsSentence2[i].TotalGivenDamage ) + string("\n"); + out = string( "ChaScore3 consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence2[i].TotalChaScore3Consume / _ActorsSentence2[i].TotalGivenDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); } if( _ActorsSentence2[i].TotalSendDamage ) { - out = string( "Stamina consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence2[i].TotalStaminaConsume / _ActorsSentence2[i].TotalSendDamage ) + string("\n"); + out = string( "ChaScore2 consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence2[i].TotalChaScore2Consume / _ActorsSentence2[i].TotalSendDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Sap consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence2[i].TotalSapConsum / _ActorsSentence2[i].TotalSendDamage ) + string("\n"); + out = string( "ChaScore3 consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence2[i].TotalChaScore3Consume / _ActorsSentence2[i].TotalSendDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); } @@ -561,9 +560,9 @@ void CTestingTool::testEnd() fputs( out.c_str(), _TestSessionReport ); out = string( "Total gived damage: " ) + NLMISC::toString( _ActorsSentence3[i].TotalGivenDamage / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Total Stamina consummate: " ) + NLMISC::toString( _ActorsSentence3[i].TotalStaminaConsume / _IterationCount ) + string("\n"); + out = string( "Total ChaScore2 consummate: " ) + NLMISC::toString( _ActorsSentence3[i].TotalChaScore2Consume / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Total Sap consummate: " ) + NLMISC::toString( _ActorsSentence3[i].TotalSapConsum / _IterationCount ) + string("\n"); + out = string( "Total ChaScore3 consummate: " ) + NLMISC::toString( _ActorsSentence3[i].TotalChaScore3Consume / _IterationCount ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); if( _ActorsSentence3[i].NbSuccess ) @@ -580,17 +579,17 @@ void CTestingTool::testEnd() if( _ActorsSentence3[i].TotalGivenDamage ) { - out = string( "Stamina consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence3[i].TotalStaminaConsume / _ActorsSentence3[i].TotalGivenDamage ) + string("\n"); + out = string( "ChaScore2 consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence3[i].TotalChaScore2Consume / _ActorsSentence3[i].TotalGivenDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Sap consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence3[i].TotalSapConsum / _ActorsSentence3[i].TotalGivenDamage ) + string("\n"); + out = string( "ChaScore3 consummate by gived damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence3[i].TotalChaScore3Consume / _ActorsSentence3[i].TotalGivenDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); } if( _ActorsSentence3[i].TotalSendDamage ) { - out = string( "Stamina consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence3[i].TotalStaminaConsume / _ActorsSentence3[i].TotalSendDamage ) + string("\n"); + out = string( "ChaScore2 consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence3[i].TotalChaScore2Consume / _ActorsSentence3[i].TotalSendDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - out = string( "Sap consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence3[i].TotalSapConsum / _ActorsSentence3[i].TotalSendDamage ) + string("\n"); + out = string( "ChaScore3 consummate by effective damage: " ) + NLMISC::toString( 1.0f * _ActorsSentence3[i].TotalChaScore3Consume / _ActorsSentence3[i].TotalSendDamage ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); } } @@ -710,9 +709,9 @@ void CTestingTool::setActorStartState( NLNET::CMessage& msgin ) if (id == _ActorsIds [i] ) { msgin.serial( _ActorsBeginStats[i] ); - _ActorsStats[i].FinalHp += _ActorsBeginStats[i].Hp; - _ActorsStats[i].FinalSta += _ActorsBeginStats[i].Sta; - _ActorsStats[i].FinalSap += _ActorsBeginStats[i].Sap; + _ActorsStats[i].FinalChaScore1 += _ActorsBeginStats[i].ChaScore1; + _ActorsStats[i].FinalChaScore2 += _ActorsBeginStats[i].ChaScore2; + _ActorsStats[i].FinalChaScore3 += _ActorsBeginStats[i].ChaScore3; break; } } @@ -909,12 +908,12 @@ void CTestingTool::logReport( NLMISC::CEntityId& id, SLogReport& LogReport ) Actor->ArmorAbsorption += LogReport.ArmorAbsorption; sentence->TotalShieldAbsorption += (uint16)LogReport.ShieldAbsorption; - // Target Hp lost - out = string(" Target Hp Lost: ") + NLMISC::toString( LogReport.HpLost ) + string("\n"); + // Target ChaScore1 lost + out = string(" Target ChaScore1 Lost: ") + NLMISC::toString( LogReport.ChaScore1Lost ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - Actor->SendDamage += LogReport.HpLost; - Cible->FinalHp -= LogReport.HpLost; - sentence->TotalSendDamage += (uint16)LogReport.HpLost; + Actor->SendDamage += LogReport.ChaScore1Lost; + Cible->FinalChaScore1 -= LogReport.ChaScore1Lost; + sentence->TotalSendDamage += (uint16)LogReport.ChaScore1Lost; // Special effect Resist, Start and Duration // ... @@ -922,24 +921,24 @@ void CTestingTool::logReport( NLMISC::CEntityId& id, SLogReport& LogReport ) if( LogReport.SentenceSucces ) { - // Used Stamina - out = string(" Used Stamina: ") + NLMISC::toString( LogReport.UsedStamina ) + string("\n"); + // Used ChaScore2 + out = string(" Used ChaScore2: ") + NLMISC::toString( LogReport.UsedChaScore2 ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - Actor->FinalSta -= LogReport.UsedStamina; - sentence->TotalStaminaConsume += (uint16)LogReport.UsedStamina; + Actor->FinalChaScore2 -= LogReport.UsedChaScore2; + sentence->TotalChaScore2Consume += (uint16)LogReport.UsedChaScore2; - // Used Sap - out = string(" Used Sap: ") + NLMISC::toString( LogReport.UsedSap ) + string("\n"); + // Used ChaScore3 + out = string(" Used ChaScore3: ") + NLMISC::toString( LogReport.UsedChaScore3 ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - Actor->FinalSap -= LogReport.UsedSap; - sentence->TotalSapConsum += (uint16)LogReport.UsedSap; + Actor->FinalChaScore3 -= LogReport.UsedChaScore3; + sentence->TotalChaScore3Consume += (uint16)LogReport.UsedChaScore3; - // Stamina left - out = string(" Stamina left: ") + NLMISC::toString( LogReport.StaminaLeft ) + string("\n"); + // ChaScore2 left + out = string(" ChaScore2 left: ") + NLMISC::toString( LogReport.ChaScore2Left ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); - // Sap left - out = string(" Sap left: ") + NLMISC::toString( LogReport.SapLeft ) + string("\n"); + // ChaScore3 left + out = string(" ChaScore3 left: ") + NLMISC::toString( LogReport.ChaScore3Left ) + string("\n"); fputs( out.c_str(), _TestSessionReport ); } diff --git a/code/ryzom/server/src/testing_tool_service/testing_tool_service.h b/code/ryzom/server/src/testing_tool_service/testing_tool_service.h index 551b0162f..5282fa9fa 100644 --- a/code/ryzom/server/src/testing_tool_service/testing_tool_service.h +++ b/code/ryzom/server/src/testing_tool_service/testing_tool_service.h @@ -86,9 +86,9 @@ public: uint32 ShieldAbsorption; uint32 ArmorAbsorption; uint32 GivenDamage; - sint32 FinalHp; - sint32 FinalSta; - sint32 FinalSap; + sint32 FinalChaScore1; + sint32 FinalChaScore2; + sint32 FinalChaScore3; void init() { @@ -99,9 +99,9 @@ public: ShieldAbsorption = 0; ArmorAbsorption = 0; GivenDamage = 0; - FinalHp = 0; - FinalSta = 0; - FinalSap = 0; + FinalChaScore1 = 0; + FinalChaScore2 = 0; + FinalChaScore3 = 0; } const SActorStatistics &operator + ( SActorStatistics& s ) @@ -113,9 +113,9 @@ public: ShieldAbsorption += s.ShieldAbsorption; ArmorAbsorption = s.ArmorAbsorption; GivenDamage = s.GivenDamage; - FinalHp += s.FinalHp; - FinalSta += s.FinalSta; - FinalSap += s.FinalSap; + FinalChaScore1 += s.FinalChaScore1; + FinalChaScore2 += s.FinalChaScore2; + FinalChaScore3 += s.FinalChaScore3; return *this; } @@ -127,8 +127,8 @@ public: uint16 NbFail; uint16 NbSuccess; uint16 TotalSendDamage; - uint16 TotalSapConsum; - uint16 TotalStaminaConsume; + uint16 TotalChaScore2Consume; + uint16 TotalChaSCore3Consume; uint16 TotalShieldAbsorption; uint16 TotalArmorAbsorption; uint16 TotalGivenDamage; @@ -139,8 +139,8 @@ public: NbFail = 0; NbSuccess = 0; TotalSendDamage = 0; - TotalSapConsum = 0; - TotalStaminaConsume = 0; + TotalChaScore2Consume = 0; + TotalChaScore3Consume = 0; TotalShieldAbsorption = 0; TotalArmorAbsorption = 0; TotalGivenDamage = 0; @@ -152,8 +152,8 @@ public: NbFail += s.NbFail; NbSuccess += s.NbSuccess; TotalSendDamage += s.TotalSendDamage; - TotalSapConsum += s.TotalSapConsum; - TotalStaminaConsume += s.TotalStaminaConsume; + TotalChaScore2Consume += s.TotalChaScore2Consum; + TotalChaScore3Consume += s.TotalChaScore3Consume; TotalShieldAbsorption += s.TotalShieldAbsorption; TotalArmorAbsorption += s.TotalArmorAbsorption; TotalGivenDamage += s.TotalGivenDamage;