Advertisement
Guest User

hudmoduleenemyfocus.ws script compilation error

a guest
Jul 13th, 2021
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.78 KB | None | 0 0
  1. /***********************************************************************/
  2. /** © 2015 CD PROJEKT S.A. All rights reserved.
  3. /** THE WITCHER® is a trademark of CD PROJEKT S. A.
  4. /** The Witcher game is based on the prose of Andrzej Sapkowski.
  5. /***********************************************************************/
  6. enum EFloatingValueType
  7. {
  8. EFVT_None,
  9. EFVT_Critical,
  10. EFVT_Block,
  11. EFVT_InstantDeath,
  12. EFVT_DoT,
  13. EFVT_Heal,
  14. EFVT_Buff
  15. }
  16.  
  17. class CR4HudModuleEnemyFocus extends CR4HudModuleBase
  18. {
  19.  
  20.  
  21.  
  22.  
  23. private var m_fxSetEnemyName : CScriptedFlashFunction;
  24. private var m_fxSetEnemyLevel : CScriptedFlashFunction;
  25. private var m_fxSetAttitude : CScriptedFlashFunction;
  26. private var m_fxSetEnemyHealth : CScriptedFlashFunction;
  27. private var m_fxSetEnemyStamina : CScriptedFlashFunction;
  28. private var m_fxSetEssenceBarVisibility : CScriptedFlashFunction;
  29. private var m_fxSetStaminaVisibility : CScriptedFlashFunction;
  30. private var m_fxSetNPCQuestIcon : CScriptedFlashFunction;
  31. private var m_fxSetDodgeFeedback : CScriptedFlashFunction;
  32. private var m_fxSetBossOrDead : CScriptedFlashFunction;
  33. private var m_fxSetShowHardLock : CScriptedFlashFunction;
  34. private var m_fxSetDamageText : CScriptedFlashFunction;
  35. private var m_fxHideDamageText : CScriptedFlashFunction;
  36. private var m_fxSetGeneralVisibility : CScriptedFlashFunction;
  37. private var m_fxSetMutationEightVisibility : CScriptedFlashFunction;
  38.  
  39. private var m_mcNPCFocus : CScriptedFlashSprite;
  40.  
  41. private var m_lastTarget : CGameplayEntity;
  42. private var m_lastTargetAttitude : EAIAttitude;
  43. private var m_lastHealthPercentage : int;
  44. private var m_wasAxiied : bool;
  45. private var m_lastStaminaPercentage : int;
  46. private var m_nameInterval : float;
  47. private var m_lastEnemyDifferenceLevel : string;
  48. private var m_lastEnemyLevelString : string;
  49. private var m_lastDodgeFeedbackTarget : CActor;
  50. private var m_lastEnemyName : string;
  51. private var m_lastUseMutation8Icon : bool;
  52. private var m_showName : bool;
  53. private var m_showDescriptiveLevel : bool;
  54.  
  55.  
  56.  
  57. event OnConfigUI()
  58. {
  59. var flashModule : CScriptedFlashSprite;
  60. var hud : CR4ScriptedHud;
  61.  
  62. m_anchorName = "ScaleOnly";
  63.  
  64. flashModule = GetModuleFlash();
  65.  
  66. m_fxSetEnemyName = flashModule.GetMemberFlashFunction( "setEnemyName" );
  67. m_fxSetEnemyLevel = flashModule.GetMemberFlashFunction( "setEnemyLevel" );
  68. m_fxSetAttitude = flashModule.GetMemberFlashFunction( "setAttitude" );
  69. m_fxSetEnemyHealth = flashModule.GetMemberFlashFunction( "setEnemyHealth" );
  70. m_fxSetEnemyStamina = flashModule.GetMemberFlashFunction( "setEnemyStamina" );
  71. m_fxSetEssenceBarVisibility = flashModule.GetMemberFlashFunction( "setEssenceBarVisibility" );
  72. m_fxSetStaminaVisibility = flashModule.GetMemberFlashFunction( "setStaminaVisibility" );
  73. m_fxSetNPCQuestIcon = flashModule.GetMemberFlashFunction( "setNPCQuestIcon" );
  74. m_fxSetDodgeFeedback = flashModule.GetMemberFlashFunction( "setDodgeFeedback" );
  75. m_fxSetDamageText = flashModule.GetMemberFlashFunction( "setDamageText" );
  76. m_fxHideDamageText = flashModule.GetMemberFlashFunction( "hideDamageText" );
  77. m_fxSetBossOrDead = flashModule.GetMemberFlashFunction( "SetBossOrDead" );
  78. m_fxSetShowHardLock = flashModule.GetMemberFlashFunction( "setShowHardLock" );
  79. m_fxSetGeneralVisibility = flashModule.GetMemberFlashFunction( "SetGeneralVisibility" );
  80. m_fxSetMutationEightVisibility = flashModule.GetMemberFlashFunction( "displayMutationEight" );
  81. m_mcNPCFocus = flashModule.GetChildFlashSprite( "mcNPCFocus" );
  82.  
  83. super.OnConfigUI();
  84.  
  85. m_fxSetEnemyName.InvokeSelfOneArg( FlashArgString( "" ) );
  86. m_fxSetEnemyStamina.InvokeSelfOneArg(FlashArgInt(0));
  87.  
  88.  
  89. hud = (CR4ScriptedHud)theGame.GetHud();
  90.  
  91. if (hud)
  92. {
  93. hud.UpdateHudConfig('EnemyFocusModule', true);
  94. }
  95. }
  96.  
  97.  
  98.  
  99. private function GetAttitudeOfTargetActor( target : CGameplayEntity ) : EAIAttitude
  100. {
  101. var targetActor : CActor;
  102.  
  103. targetActor = ( CActor )target;
  104. if ( targetActor )
  105. {
  106. return targetActor.GetAttitude( thePlayer );
  107. }
  108. return AIA_Neutral;
  109. }
  110.  
  111.  
  112. public function SetDodgeFeedback( target : CActor ) :void
  113. {
  114. m_fxSetDodgeFeedback.InvokeSelfOneArg( FlashArgBool( !( !target ) ) );
  115. m_lastDodgeFeedbackTarget = target;
  116. }
  117.  
  118.  
  119. public function DisplayMutationEight( value : bool ) :void
  120. {
  121. m_fxSetMutationEightVisibility.InvokeSelfOneArg( FlashArgBool ( value ) );
  122. }
  123.  
  124.  
  125. public function SetGeneralVisibility( showEnemyFocus : bool, showName : bool, showDescriptiveLevel : bool )
  126. {
  127. m_fxSetGeneralVisibility.InvokeSelfTwoArgs( FlashArgBool( showEnemyFocus ), FlashArgBool( showDescriptiveLevel ) );
  128. m_showName = showName;
  129. }
  130.  
  131.  
  132.  
  133. public function ShowDamageType(valueType : EFloatingValueType, value : float, optional stringParam : string)
  134. {
  135. var label:string;
  136. var color:float;
  137. var hud:CR4ScriptedHud;
  138.  
  139. //---=== modFriendlyHUD ===---
  140. if ( GetFHUDConfig().doNotShowDamage )
  141. return;
  142. //---=== modFriendlyHUD ===---
  143.  
  144. if(valueType != EFVT_InstantDeath && valueType != EFVT_Buff && value == 0.f)
  145. return;
  146.  
  147. hud = (CR4ScriptedHud)theGame.GetHud();
  148. if ( !hud.AreEnabledEnemyHitEffects() )
  149. {
  150. return;
  151. }
  152.  
  153. switch (valueType)
  154. {
  155. case EFVT_Critical:
  156. label = GetLocStringByKeyExt("attribute_name_critical_hit_damage");
  157. color = 0xFDFFC2;
  158. break;
  159. case EFVT_InstantDeath:
  160. label = GetLocStringByKeyExt("effect_instant_death");
  161. color = 0xFFC2C2;
  162. break;
  163. case EFVT_Block:
  164. label = GetLocStringByKeyExt("");
  165. color = 0xFC5B5B;
  166. break;
  167. case EFVT_DoT:
  168. label = GetLocStringByKeyExt("");
  169. color = 0xFF0000;
  170. break;
  171. case EFVT_Heal:
  172. label = GetLocStringByKeyExt("");
  173. color = 0x00FF00;
  174. break;
  175. case EFVT_Buff:
  176. label = GetLocStringByKeyExt(stringParam);
  177. color = 0xFFF0F0;
  178. break;
  179. default:
  180. label = GetLocStringByKeyExt("");
  181. color = 0xFFF0F0;
  182. break;
  183. }
  184. SetDamageText(label, CeilF(value), color);
  185. }
  186.  
  187.  
  188.  
  189. private function SetDamageText(label:string, value:int, color:float) : void
  190. {
  191. m_fxSetDamageText.InvokeSelfThreeArgs( FlashArgString(label), FlashArgNumber(value), FlashArgNumber(color) );
  192. }
  193. public function HideDamageText()
  194. {
  195. m_fxHideDamageText.InvokeSelf();
  196. }
  197.  
  198.  
  199.  
  200.  
  201. event OnTick( timeDelta : float )
  202. {
  203. var l_target : CNewNPC;
  204. var l_targetNonActor : CGameplayEntity;
  205. var l_isHuman : bool;
  206. var l_isDifferentTarget : bool;
  207. var l_wasAxiied : bool;
  208. var l_currentHealthPercentage : int;
  209. var l_currentStaminaPercentage : int;
  210. var l_currentTargetAttitude : EAIAttitude;
  211. var l_currentEnemyDifferenceLevel : string;
  212. var l_currentEnemyLevelString : string;
  213. var l_targetScreenPos : Vector;
  214. var l_dodgeFeedbackTarget : CActor;
  215. var l_isBoss : bool;
  216. var screenMargin : float = 0.025;
  217. var marginLeftTop : Vector;
  218. var marginRightBottom : Vector;
  219. var hud : CR4ScriptedHud;
  220. var extraOffset : int;
  221. var herbTag : name;
  222. var herbEntity : W3Herb;
  223. var definitionManager : CDefinitionsManagerAccessor;
  224. var useMutation8Icon : bool;
  225. var displayName, entityName, levelName : string;
  226. var language, audioLanguage : string;
  227. l_targetNonActor = thePlayer.GetDisplayTarget();
  228. l_target = (CNewNPC)l_targetNonActor;
  229. l_dodgeFeedbackTarget = thePlayer.GetDodgeFeedbackTarget();
  230.  
  231. hud = (CR4ScriptedHud)theGame.GetHud();
  232.  
  233. definitionManager = theGame.GetDefinitionsManager();
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245. if ( l_target )
  246. {
  247. if ( !l_target.IsUsingTooltip())
  248. {
  249. l_target = NULL;
  250. }
  251. }
  252. if ( l_target )
  253. {
  254.  
  255.  
  256. if ( l_target.HasTag( 'HideHealthBarModule' ) )
  257. {
  258. if ( l_target.HasTag( 'NotBoss' ) )
  259. {
  260. l_target = NULL;
  261. }
  262. else
  263. l_isBoss = (!GetFHUDConfig().showBossHP); //modFriendlyHUD
  264. }
  265. else
  266. {
  267.  
  268. if ( (CHeartMiniboss)l_target )
  269. {
  270. l_target = NULL;
  271. }
  272. }
  273. }
  274.  
  275. if ( l_target )
  276. {
  277.  
  278. l_isHuman = l_target.IsHuman();
  279. l_isDifferentTarget = ( l_target != m_lastTarget );
  280. l_wasAxiied = ( l_target.GetAttitudeGroup() == 'npc_charmed' );
  281.  
  282.  
  283.  
  284.  
  285. if(l_isDifferentTarget && l_target && !l_target.IsInCombat() && IsRequiredAttitudeBetween(thePlayer, l_target, true))
  286. {
  287. l_target.RecalcLevel();
  288. }
  289.  
  290.  
  291. if ( l_isDifferentTarget )
  292. {
  293. m_fxSetBossOrDead.InvokeSelfOneArg( FlashArgBool( l_isBoss || !l_target.IsAlive() ) );
  294.  
  295.  
  296. HideDamageText();
  297.  
  298.  
  299. m_fxSetStaminaVisibility.InvokeSelfOneArg( FlashArgBool( l_isHuman ) );
  300. m_fxSetEssenceBarVisibility.InvokeSelfOneArg( FlashArgBool( l_target.UsesEssence()) );
  301. UpdateQuestIcon( l_target );
  302. SetDodgeFeedback( NULL );
  303.  
  304. ShowElement( true );
  305.  
  306. m_lastTarget = l_target;
  307. }
  308.  
  309.  
  310.  
  311. l_currentTargetAttitude = l_target.GetAttitude( thePlayer );
  312. if ( l_currentTargetAttitude != AIA_Hostile )
  313. {
  314.  
  315. if ( l_target.IsVIP() )
  316. {
  317. l_currentTargetAttitude = 4;
  318. }
  319. }
  320.  
  321. if ( l_isDifferentTarget || m_lastTargetAttitude != l_currentTargetAttitude || m_wasAxiied != l_wasAxiied )
  322. {
  323. m_lastTargetAttitude = l_currentTargetAttitude;
  324. m_wasAxiied = l_wasAxiied;
  325. if( m_wasAxiied )
  326. {
  327. m_fxSetAttitude.InvokeSelfOneArg( FlashArgInt( 3 ) );
  328. }
  329. else
  330. {
  331. m_fxSetAttitude.InvokeSelfOneArg( FlashArgInt( l_currentTargetAttitude ) );
  332. }
  333. }
  334.  
  335.  
  336. if ( m_lastDodgeFeedbackTarget != l_dodgeFeedbackTarget )
  337. {
  338. if ( l_currentTargetAttitude == AIA_Hostile )
  339. {
  340. SetDodgeFeedback( l_dodgeFeedbackTarget );
  341. }
  342. else
  343. {
  344. SetDodgeFeedback( NULL );
  345. }
  346. m_lastDodgeFeedbackTarget = l_dodgeFeedbackTarget;
  347. }
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354. m_nameInterval -= timeDelta;
  355. if ( l_isDifferentTarget || m_nameInterval < 0 )
  356. {
  357. m_nameInterval = 0.25;
  358.  
  359. //---=== modFriendlyHUD ===---
  360. if( GetFHUDConfig().ShowNPCName(l_target) )
  361. {
  362. if (l_currentTargetAttitude == AIA_Hostile && !l_isBoss && !DisallowDescriptive(l_target))
  363. {
  364. levelName = definitionManager.GetDescriptiveLevel(l_target);
  365. }
  366.  
  367. entityName = l_target.GetDisplayName();
  368. theGame.GetGameLanguageName(audioLanguage, language);
  369.  
  370. if (levelName != "" && KeyCharacterName(entityName, language))
  371. {
  372. levelName = "";
  373. }
  374.  
  375. if (m_showName)
  376. {
  377. if (levelName != "")
  378. {
  379. if (language == "RU")
  380. {
  381. entityName = StrLowerUTF(entityName);
  382. }
  383.  
  384. if (language == "FR")
  385. {
  386. displayName = entityName + " " + levelName;
  387. }
  388. else
  389. {
  390. displayName = levelName + " " + entityName;
  391. }
  392. }
  393. else
  394. {
  395. displayName = entityName;
  396. }
  397. }
  398. else
  399. {
  400. displayName = levelName;
  401. }
  402. }
  403.  
  404. UpdateName( displayName );
  405. }
  406. else
  407. {
  408. UpdateName( "" );
  409. }
  410. //---=== modFriendlyHUD ===---
  411. }
  412.  
  413.  
  414. l_currentHealthPercentage = CeilF( 100 * l_target.GetHealthPercents() );
  415. if ( m_lastHealthPercentage != l_currentHealthPercentage )
  416. {
  417. m_lastHealthPercentage = l_currentHealthPercentage;
  418. m_fxSetEnemyHealth.InvokeSelfOneArg( FlashArgInt( l_currentHealthPercentage ) );
  419.  
  420. }
  421.  
  422.  
  423. l_currentStaminaPercentage = CeilF( 100 * l_target.GetStaminaPercents() );
  424. if ( m_lastStaminaPercentage != l_currentStaminaPercentage )
  425. {
  426. m_lastStaminaPercentage = l_currentStaminaPercentage;
  427. m_fxSetEnemyStamina.InvokeSelfOneArg( FlashArgInt( l_currentStaminaPercentage ) );
  428. }
  429.  
  430.  
  431. l_currentEnemyDifferenceLevel = l_target.GetExperienceDifferenceLevelName( l_currentEnemyLevelString );
  432. if ( l_isDifferentTarget ||
  433. m_lastEnemyDifferenceLevel != l_currentEnemyDifferenceLevel ||
  434. m_lastEnemyLevelString != l_currentEnemyLevelString )
  435. {
  436. m_lastEnemyDifferenceLevel = l_currentEnemyDifferenceLevel;
  437. m_lastEnemyLevelString = l_currentEnemyLevelString;
  438. //---=== modFriendlyHUD ===---
  439. switch ( GetFHUDConfig().doNotShowLevels )
  440. {
  441. case 1:
  442. m_fxSetEnemyLevel.InvokeSelfTwoArgs( FlashArgString( "none" ), FlashArgString( "" ) );
  443. break;
  444. case 2:
  445. m_fxSetEnemyLevel.InvokeSelfTwoArgs( FlashArgString( l_currentEnemyDifferenceLevel ), FlashArgString( "*" ) );
  446. break;
  447. default:
  448. m_fxSetEnemyLevel.InvokeSelfTwoArgs( FlashArgString( l_currentEnemyDifferenceLevel ), FlashArgString( l_currentEnemyLevelString ) );
  449. break;
  450. }
  451. //---=== modFriendlyHUD ===---
  452. }
  453.  
  454.  
  455. useMutation8Icon = GetWitcherPlayer().IsMutationActive( EPMT_Mutation8 ) && !l_target.IsImmuneToMutation8Finisher();
  456. if ( m_lastUseMutation8Icon != useMutation8Icon )
  457. {
  458. m_lastUseMutation8Icon = useMutation8Icon;
  459. DisplayMutationEight( useMutation8Icon );
  460. }
  461.  
  462.  
  463. if ( GetBaseScreenPosition( l_targetScreenPos, l_target ) )
  464. {
  465. l_targetScreenPos.Y -= 45;
  466.  
  467. marginLeftTop = hud.GetScaleformPoint( screenMargin, screenMargin );
  468. marginRightBottom = hud.GetScaleformPoint( 1 - screenMargin, 1 - screenMargin );
  469.  
  470. if ( l_targetScreenPos.X < marginLeftTop.X )
  471. {
  472. l_targetScreenPos.X = marginLeftTop.X;
  473. }
  474. else if ( l_targetScreenPos.X > marginRightBottom.X )
  475. {
  476. l_targetScreenPos.X = marginRightBottom.X;
  477. }
  478.  
  479. if ( l_targetScreenPos.Y < marginLeftTop.Y )
  480. {
  481. l_targetScreenPos.Y = marginLeftTop.Y;
  482. }
  483. else if ( l_targetScreenPos.Y > marginRightBottom.Y )
  484. {
  485. l_targetScreenPos.Y = marginRightBottom.Y;
  486. }
  487.  
  488. m_mcNPCFocus.SetVisible( true );
  489. m_mcNPCFocus.SetPosition( l_targetScreenPos.X, l_targetScreenPos.Y );
  490. }
  491. else
  492. {
  493. m_mcNPCFocus.SetVisible( false );
  494. }
  495. }
  496. else if ( l_targetNonActor )
  497. {
  498.  
  499. l_isDifferentTarget = ( l_targetNonActor != m_lastTarget );
  500.  
  501.  
  502. if ( l_isDifferentTarget )
  503. {
  504.  
  505. m_fxSetStaminaVisibility.InvokeSelfOneArg( FlashArgBool( false ) );
  506. m_fxSetEssenceBarVisibility.InvokeSelfOneArg( FlashArgBool( false ) );
  507. UpdateQuestIcon( (CNewNPC)l_targetNonActor );
  508. SetDodgeFeedback( NULL );
  509.  
  510. ShowElement( true );
  511.  
  512. m_fxSetAttitude.InvokeSelfOneArg( FlashArgInt( 0 ) );
  513. m_fxSetEnemyLevel.InvokeSelfTwoArgs( FlashArgString( "none" ), FlashArgString( "" ) );
  514.  
  515.  
  516. m_lastTarget = l_targetNonActor;
  517. m_lastTargetAttitude = GetAttitudeOfTargetActor( m_lastTarget );
  518. m_lastHealthPercentage = -1;
  519. m_lastStaminaPercentage = -1;
  520. m_lastEnemyDifferenceLevel = "none";
  521. m_lastEnemyLevelString = "";
  522. }
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530. herbEntity = (W3Herb)l_targetNonActor;
  531. if ( herbEntity && m_showName )
  532. {
  533. extraOffset = 140;
  534. m_nameInterval -= timeDelta;
  535. if ( l_isDifferentTarget || m_nameInterval < 0 )
  536. {
  537. m_nameInterval = 0.25;
  538.  
  539. herbEntity.GetStaticMapPinTag( herbTag );
  540. //---=== modFriendlyHUD ===---
  541. if ( (bool)herbTag && !GetFHUDConfig().hideHerbNames )
  542. //---=== modFriendlyHUD ===---
  543. {
  544. //definitionManager = theGame.GetDefinitionsManager();
  545. if ( definitionManager )
  546. {
  547. UpdateName( GetLocStringByKeyExt( definitionManager.GetItemLocalisationKeyName( herbTag ) ) );
  548. }
  549. }
  550. else
  551. {
  552. UpdateName( "" );
  553. }
  554. }
  555. }
  556. else
  557. {
  558. if ( l_isDifferentTarget )
  559. {
  560. UpdateName( "" );
  561. }
  562. }
  563.  
  564.  
  565. useMutation8Icon = false;
  566. if ( m_lastUseMutation8Icon != useMutation8Icon )
  567. {
  568. DisplayMutationEight( useMutation8Icon );
  569. m_lastUseMutation8Icon = useMutation8Icon;
  570. }
  571.  
  572.  
  573. if ( GetBaseScreenPosition( l_targetScreenPos, l_targetNonActor ) )
  574. {
  575. l_targetScreenPos.Y -= 10;
  576. l_targetScreenPos.Y -= extraOffset;
  577.  
  578. marginLeftTop = hud.GetScaleformPoint( screenMargin, screenMargin );
  579. marginRightBottom = hud.GetScaleformPoint( 1 - screenMargin, 1 - screenMargin );
  580.  
  581. if ( l_targetScreenPos.X < marginLeftTop.X )
  582. {
  583. l_targetScreenPos.X = marginLeftTop.X;
  584. }
  585. else if ( l_targetScreenPos.X > marginRightBottom.X )
  586. {
  587. l_targetScreenPos.X = marginRightBottom.X;
  588. }
  589.  
  590. if ( l_targetScreenPos.Y < marginLeftTop.Y )
  591. {
  592. l_targetScreenPos.Y = marginLeftTop.Y;
  593. }
  594. else if ( l_targetScreenPos.Y > marginRightBottom.Y )
  595. {
  596. l_targetScreenPos.Y = marginRightBottom.Y;
  597. }
  598.  
  599. m_mcNPCFocus.SetVisible( true );
  600. m_mcNPCFocus.SetPosition( l_targetScreenPos.X, l_targetScreenPos.Y );
  601. }
  602. else
  603. {
  604. m_mcNPCFocus.SetVisible( false );
  605. }
  606. }
  607. else if ( m_lastTarget )
  608. {
  609. m_lastTarget = NULL;
  610. m_mcNPCFocus.SetVisible( false );
  611. SetDodgeFeedback( NULL );
  612. ShowElement( false );
  613. }
  614. else
  615. {
  616.  
  617. if ( m_mcNPCFocus.GetVisible() )
  618. {
  619. m_mcNPCFocus.SetVisible( false );
  620. ShowElement( false );
  621. }
  622. }
  623. }
  624.  
  625. private function DisallowDescriptive(l_target : CNewNPC) : bool
  626. {
  627. return (
  628. l_target.HasAbility('mon_troll_fistfight') ||
  629. l_target.HasAbility('mon_wild_hunt_default') ||
  630. l_target.HasAbility('mon_heart_miniboss') ||
  631. l_target.HasAbility('mon_wild_hunt_minion_weak') ||
  632. l_target.HasAbility('mon_wild_hunt_minion_lesser') ||
  633. l_target.HasAbility('mon_wild_hunt_minion') ||
  634. l_target.HasAbility('mon_witch1') ||
  635. l_target.HasAbility('mon_witch2') ||
  636. l_target.HasAbility('mon_witch3') ||
  637. l_target.HasAbility('mon_q704_ft_pixies') ||
  638. l_target.HasAbility('SkillFistsHard') ||
  639. l_target.HasAbility('SkillFistsMedium') ||
  640. l_target.HasAbility('SkillFistsEasy') ||
  641. l_target.HasAbility('mon_dettlaff_construct_base') ||
  642. l_target.HasAbility('mon_dettlaff_column_weak') ||
  643. l_target.HasAbility('mon_dettlaff_column_strong') ||
  644. l_target.HasAbility('mq1019_priestFakeLevel') ||
  645. l_target.HasAbility('olgierd_default_stats') ||
  646. l_target.HasAbility('mon_broom_base') ||
  647. l_target.HasAbility('banshee_summons') ||
  648. l_target.HasAbility('mon_baronswife') ||
  649. l_target.HasAbility('VesemirDamage') ||
  650. l_target.HasAbility('HealthFistFightTutorial') ||
  651. l_target.HasAbility('HealthFistFightEasy') ||
  652. l_target.HasAbility('HealthFistFightMedium') ||
  653. l_target.HasAbility('HealthFistFightHard') ||
  654. l_target.HasAbility('qth1003_kiyan') ||
  655. l_target.HasAbility('qRosaVarAttre') ||
  656. l_target.HasAbility('qSergeantFistFIght') ||
  657. l_target.HasAbility('MiniBoss') ||
  658. l_target.HasAbility('Boss') ||
  659. l_target.HasAbility('q302_whorenson') ||
  660. l_target.HasAbility('q302_bear') ||
  661. l_target.HasAbility('q302_mh104') ||
  662. l_target.HasAbility('q302_ReplacerThugs') ||
  663. l_target.HasAbility('mq0003_noonwraith')
  664. );
  665. }
  666.  
  667. private function KeyCharacterName(entityName : string, language : string) : bool
  668. {
  669. return (
  670. entityName == GetLocStringById(509796) || //Nathaniel Pastodi
  671. entityName == GetLocStringById(492157) || //Ernst van Hoorn
  672. entityName == GetLocStringById(1049412) || //Gustav Roene
  673. entityName == GetLocStringById(174091) || //Dandelion
  674. (entityName == GetLocStringById(1051217) && language == "RU") || //Whoreson's Henchman
  675. entityName == GetLocStringById(467824) || //Vernossiel
  676. entityName == GetLocStringById(1159914) || //Pale Widow
  677. entityName == GetLocStringById(341434) || //Steingrim
  678. entityName == GetLocStringById(1086642) || //Clan An Craite Guard
  679. entityName == GetLocStringById(1086643) || //Clan Brokvar Guard
  680. entityName == GetLocStringById(1086644) || //Clan Dimun Guard
  681. entityName == GetLocStringById(1086645) || //Clan Drummond Guard
  682. entityName == GetLocStringById(1086646) || //Clan Heymaey Guard
  683. entityName == GetLocStringById(180880) || //Clan Tuirseach Guard
  684. entityName == GetLocStringById(1086456) || //Brokvar Shieldmaiden
  685. entityName == GetLocStringById(1086457) || //An Craite Shieldmaiden
  686. entityName == GetLocStringById(1086458) || //Dimun Shieldmaiden
  687. entityName == GetLocStringById(1086459) || //Drummond Shieldmaiden
  688. entityName == GetLocStringById(1086460) || //Heymaey Shieldmaiden
  689. entityName == GetLocStringById(1086461) || //Tuirseach Shieldmaiden
  690. entityName == GetLocStringById(1047248) || //Troll Joe
  691. entityName == GetLocStringById(1047249) || //Troll Jesse
  692. entityName == GetLocStringById(1047252) || //Troll Dodger
  693. entityName == GetLocStringById(503840) || //Ronvid of the Small Marsh
  694. entityName == GetLocStringById(1055566) || //Ronvid's Friend
  695. entityName == GetLocStringById(1199817) || //Madman Lugos 1/2
  696. entityName == GetLocStringById(166474) || //Madman Lugos 2/2
  697. entityName == GetLocStringById(1018188) || //Jutta
  698. entityName == GetLocStringById(581137) || //Hammond
  699. entityName == GetLocStringById(501932) || //Morkvarg
  700. entityName == GetLocStringById(1055580) || //Manfred Grossbart
  701. entityName == GetLocStringById(1055581) || //Hegel Grossbart
  702. entityName == GetLocStringById(1055582) || //Jesse Grossbart
  703. entityName == GetLocStringById(1056273) || //Ulle the Unlucky
  704. entityName == GetLocStringById(474721) || //Kori
  705. entityName == GetLocStringById(474724) || //Kraki
  706. entityName == GetLocStringById(1051564) || //Simun Brambling
  707. entityName == GetLocStringById(1059579) || //Guard Dog
  708. entityName == GetLocStringById(166457) || //Arnvald
  709. entityName == GetLocStringById(171505) || //Fugas
  710. entityName == GetLocStringById(180322) || //Halgrim
  711. entityName == GetLocStringById(1048435) || //Earl
  712. (entityName == GetLocStringById(480174) && language == "RU") || //Dijkstra's Henchman 1/3
  713. (entityName == GetLocStringById(488917) && language == "RU") || //Dijkstra's Henchman 2/3
  714. (entityName == GetLocStringById(1052062) && language == "RU") || //Dijkstra's Henchman 3/3
  715. entityName == GetLocStringById(1059068) || //Bart
  716. entityName == GetLocStringById(595891) || //Peasant 1/8
  717. entityName == GetLocStringById(1055097) || //Peasant 2/8
  718. entityName == GetLocStringById(166469) || //Peasant 3/8
  719. entityName == GetLocStringById(172329) || //Peasant 4/8
  720. entityName == GetLocStringById(444265) || //Peasant 5/8
  721. entityName == GetLocStringById(532375) || //Peasant 6/8
  722. entityName == GetLocStringById(595913) || //Peasant 7/8
  723. entityName == GetLocStringById(1055084) || //Peasant 8/8
  724. entityName == GetLocStringById(1137608) || //Eulalia von Everec
  725. entityName == GetLocStringById(1137609) || //Honoratina von Everec
  726. entityName == GetLocStringById(1137610) || //Kestatis von Everec
  727. entityName == GetLocStringById(1137611) || //Alexy von Everec
  728. entityName == GetLocStringById(1137612) || //Ernest von Everec
  729. entityName == GetLocStringById(1104540) || //Quinto
  730. entityName == GetLocStringById(1104837) || //Casimir
  731. entityName == GetLocStringById(1079736) || //Young One
  732. entityName == GetLocStringById(525756) || //Young Arachas
  733. entityName == GetLocStringById(1197251) || //Living Statue
  734. entityName == GetLocStringById(1125951) || //Delwyn of Creigiau
  735. entityName == GetLocStringById(1125948) || //Rainfarn of Attre
  736. entityName == GetLocStringById(1125920) || //Donimir of Troy
  737. entityName == GetLocStringById(1125950) || //Guy de Bois-Fresnes
  738. entityName == GetLocStringById(1125949) || //Prince Horm Akerspaark of Maecht
  739. entityName == GetLocStringById(1125952) || //Llinos of Metinna
  740. entityName == GetLocStringById(1124660) || //Baron Palmerin de Launfal
  741. entityName == GetLocStringById(172316) || //Witch Hunter
  742. (entityName == GetLocStringById(458127) && language == "RU") || //Guard 1/2
  743. (entityName == GetLocStringById(458130) && language == "RU") || //Guard 2/2
  744. entityName == GetLocStringById(300169) || //Philippa Eilhart 1/2
  745. entityName == GetLocStringById(1065213) || //Philippa Eilhart 2/2
  746. (entityName == GetLocStringById(1194573) && language == "RU") || //Hansa Dog
  747. (entityName == GetLocStringById(1119408) && language == "RU") || //Dracolizard
  748. entityName == GetLocStringById(1209398) || //Dracolizard Matriarch
  749. entityName == GetLocStringById(1168278) || //Great Beggar's Ghost
  750. entityName == GetLocStringById(1145517) || //Beau Duvall
  751. entityName == GetLocStringById(1188336) || //Gromm
  752. entityName == GetLocStringById(1188337) || //Argoin
  753. entityName == GetLocStringById(1188338) || //Yaki Rafiberg
  754. entityName == GetLocStringById(1209925) || //Hornitz
  755. entityName == GetLocStringById(1199456) || //Tad
  756. entityName == GetLocStringById(1199454) || //Madden
  757. entityName == GetLocStringById(1199455) || //Nevin
  758. entityName == GetLocStringById(1199453) || //Keir
  759. entityName == GetLocStringById(1184463) || //Roderick of Dun Tynne
  760. entityName == GetLocStringById(1207111) || //Iron Borg
  761. entityName == GetLocStringById(1205323) || //Peeps
  762. entityName == GetLocStringById(1205362) || //Ox
  763. entityName == GetLocStringById(1205382) || //Gueule
  764. entityName == GetLocStringById(1205389) || //Catfish
  765. entityName == GetLocStringById(1187538) || //Dun Tynne Guard
  766. (entityName == GetLocStringById(1199796) && language == "RU") || //Nazairi Bandit 1/2
  767. (entityName == GetLocStringById(1200141) && language == "RU") || //Nazairi Bandit 2/2
  768. entityName == GetLocStringById(1199660) || //Cael
  769. entityName == GetLocStringById(1165552) || //Redbeard 1/3
  770. entityName == GetLocStringById(1186383) || //Redbeard 2/3
  771. entityName == GetLocStringById(1190140) //Redbeard 3/3
  772. );
  773. }
  774.  
  775. private function DisallowDescriptive(l_target : CNewNPC) : bool
  776. {
  777. return (
  778. l_target.HasAbility('mon_troll_fistfight') ||
  779. l_target.HasAbility('mon_wild_hunt_default') ||
  780. l_target.HasAbility('mon_heart_miniboss') ||
  781. l_target.HasAbility('mon_wild_hunt_minion_weak') ||
  782. l_target.HasAbility('mon_wild_hunt_minion_lesser') ||
  783. l_target.HasAbility('mon_wild_hunt_minion') ||
  784. l_target.HasAbility('mon_witch1') ||
  785. l_target.HasAbility('mon_witch2') ||
  786. l_target.HasAbility('mon_witch3') ||
  787. l_target.HasAbility('mon_q704_ft_pixies') ||
  788. l_target.HasAbility('SkillFistsHard') ||
  789. l_target.HasAbility('SkillFistsMedium') ||
  790. l_target.HasAbility('SkillFistsEasy') ||
  791. l_target.HasAbility('mon_dettlaff_construct_base') ||
  792. l_target.HasAbility('mon_dettlaff_column_weak') ||
  793. l_target.HasAbility('mon_dettlaff_column_strong') ||
  794. l_target.HasAbility('mq1019_priestFakeLevel') ||
  795. l_target.HasAbility('olgierd_default_stats') ||
  796. l_target.HasAbility('mon_broom_base') ||
  797. l_target.HasAbility('banshee_summons') ||
  798. l_target.HasAbility('mon_baronswife') ||
  799. l_target.HasAbility('VesemirDamage') ||
  800. l_target.HasAbility('HealthFistFightTutorial') ||
  801. l_target.HasAbility('HealthFistFightEasy') ||
  802. l_target.HasAbility('HealthFistFightMedium') ||
  803. l_target.HasAbility('HealthFistFightHard') ||
  804. l_target.HasAbility('qth1003_kiyan') ||
  805. l_target.HasAbility('qRosaVarAttre') ||
  806. l_target.HasAbility('qSergeantFistFIght') ||
  807. l_target.HasAbility('MiniBoss') ||
  808. l_target.HasAbility('Boss') ||
  809. l_target.HasAbility('q302_whorenson') ||
  810. l_target.HasAbility('q302_bear') ||
  811. l_target.HasAbility('q302_mh104') ||
  812. l_target.HasAbility('q302_ReplacerThugs') ||
  813. l_target.HasAbility('mq0003_noonwraith')
  814. );
  815. }
  816.  
  817. private function KeyCharacterName(entityName : string, language : string) : bool
  818. {
  819. return (
  820. entityName == GetLocStringById(509796) || //Nathaniel Pastodi
  821. entityName == GetLocStringById(492157) || //Ernst van Hoorn
  822. entityName == GetLocStringById(1049412) || //Gustav Roene
  823. entityName == GetLocStringById(174091) || //Dandelion
  824. (entityName == GetLocStringById(1051217) && language == "RU") || //Whoreson's Henchman
  825. entityName == GetLocStringById(467824) || //Vernossiel
  826. entityName == GetLocStringById(1159914) || //Pale Widow
  827. entityName == GetLocStringById(341434) || //Steingrim
  828. entityName == GetLocStringById(1086642) || //Clan An Craite Guard
  829. entityName == GetLocStringById(1086643) || //Clan Brokvar Guard
  830. entityName == GetLocStringById(1086644) || //Clan Dimun Guard
  831. entityName == GetLocStringById(1086645) || //Clan Drummond Guard
  832. entityName == GetLocStringById(1086646) || //Clan Heymaey Guard
  833. entityName == GetLocStringById(180880) || //Clan Tuirseach Guard
  834. entityName == GetLocStringById(1086456) || //Brokvar Shieldmaiden
  835. entityName == GetLocStringById(1086457) || //An Craite Shieldmaiden
  836. entityName == GetLocStringById(1086458) || //Dimun Shieldmaiden
  837. entityName == GetLocStringById(1086459) || //Drummond Shieldmaiden
  838. entityName == GetLocStringById(1086460) || //Heymaey Shieldmaiden
  839. entityName == GetLocStringById(1086461) || //Tuirseach Shieldmaiden
  840. entityName == GetLocStringById(1047248) || //Troll Joe
  841. entityName == GetLocStringById(1047249) || //Troll Jesse
  842. entityName == GetLocStringById(1047252) || //Troll Dodger
  843. entityName == GetLocStringById(503840) || //Ronvid of the Small Marsh
  844. entityName == GetLocStringById(1055566) || //Ronvid's Friend
  845. entityName == GetLocStringById(1199817) || //Madman Lugos 1/2
  846. entityName == GetLocStringById(166474) || //Madman Lugos 2/2
  847. entityName == GetLocStringById(1018188) || //Jutta
  848. entityName == GetLocStringById(581137) || //Hammond
  849. entityName == GetLocStringById(501932) || //Morkvarg
  850. entityName == GetLocStringById(1055580) || //Manfred Grossbart
  851. entityName == GetLocStringById(1055581) || //Hegel Grossbart
  852. entityName == GetLocStringById(1055582) || //Jesse Grossbart
  853. entityName == GetLocStringById(1056273) || //Ulle the Unlucky
  854. entityName == GetLocStringById(474721) || //Kori
  855. entityName == GetLocStringById(474724) || //Kraki
  856. entityName == GetLocStringById(1051564) || //Simun Brambling
  857. entityName == GetLocStringById(1059579) || //Guard Dog
  858. entityName == GetLocStringById(166457) || //Arnvald
  859. entityName == GetLocStringById(171505) || //Fugas
  860. entityName == GetLocStringById(180322) || //Halgrim
  861. entityName == GetLocStringById(1048435) || //Earl
  862. (entityName == GetLocStringById(480174) && language == "RU") || //Dijkstra's Henchman 1/3
  863. (entityName == GetLocStringById(488917) && language == "RU") || //Dijkstra's Henchman 2/3
  864. (entityName == GetLocStringById(1052062) && language == "RU") || //Dijkstra's Henchman 3/3
  865. entityName == GetLocStringById(1059068) || //Bart
  866. entityName == GetLocStringById(595891) || //Peasant 1/8
  867. entityName == GetLocStringById(1055097) || //Peasant 2/8
  868. entityName == GetLocStringById(166469) || //Peasant 3/8
  869. entityName == GetLocStringById(172329) || //Peasant 4/8
  870. entityName == GetLocStringById(444265) || //Peasant 5/8
  871. entityName == GetLocStringById(532375) || //Peasant 6/8
  872. entityName == GetLocStringById(595913) || //Peasant 7/8
  873. entityName == GetLocStringById(1055084) || //Peasant 8/8
  874. entityName == GetLocStringById(1137608) || //Eulalia von Everec
  875. entityName == GetLocStringById(1137609) || //Honoratina von Everec
  876. entityName == GetLocStringById(1137610) || //Kestatis von Everec
  877. entityName == GetLocStringById(1137611) || //Alexy von Everec
  878. entityName == GetLocStringById(1137612) || //Ernest von Everec
  879. entityName == GetLocStringById(1104540) || //Quinto
  880. entityName == GetLocStringById(1104837) || //Casimir
  881. entityName == GetLocStringById(1079736) || //Young One
  882. entityName == GetLocStringById(525756) || //Young Arachas
  883. entityName == GetLocStringById(1197251) || //Living Statue
  884. entityName == GetLocStringById(1125951) || //Delwyn of Creigiau
  885. entityName == GetLocStringById(1125948) || //Rainfarn of Attre
  886. entityName == GetLocStringById(1125920) || //Donimir of Troy
  887. entityName == GetLocStringById(1125950) || //Guy de Bois-Fresnes
  888. entityName == GetLocStringById(1125949) || //Prince Horm Akerspaark of Maecht
  889. entityName == GetLocStringById(1125952) || //Llinos of Metinna
  890. entityName == GetLocStringById(1124660) || //Baron Palmerin de Launfal
  891. entityName == GetLocStringById(172316) || //Witch Hunter
  892. (entityName == GetLocStringById(458127) && language == "RU") || //Guard 1/2
  893. (entityName == GetLocStringById(458130) && language == "RU") || //Guard 2/2
  894. entityName == GetLocStringById(300169) || //Philippa Eilhart 1/2
  895. entityName == GetLocStringById(1065213) || //Philippa Eilhart 2/2
  896. (entityName == GetLocStringById(1194573) && language == "RU") || //Hansa Dog
  897. (entityName == GetLocStringById(1119408) && language == "RU") || //Dracolizard
  898. entityName == GetLocStringById(1209398) || //Dracolizard Matriarch
  899. entityName == GetLocStringById(1168278) || //Great Beggar's Ghost
  900. entityName == GetLocStringById(1145517) || //Beau Duvall
  901. entityName == GetLocStringById(1188336) || //Gromm
  902. entityName == GetLocStringById(1188337) || //Argoin
  903. entityName == GetLocStringById(1188338) || //Yaki Rafiberg
  904. entityName == GetLocStringById(1209925) || //Hornitz
  905. entityName == GetLocStringById(1199456) || //Tad
  906. entityName == GetLocStringById(1199454) || //Madden
  907. entityName == GetLocStringById(1199455) || //Nevin
  908. entityName == GetLocStringById(1199453) || //Keir
  909. entityName == GetLocStringById(1184463) || //Roderick of Dun Tynne
  910. entityName == GetLocStringById(1207111) || //Iron Borg
  911. entityName == GetLocStringById(1205323) || //Peeps
  912. entityName == GetLocStringById(1205362) || //Ox
  913. entityName == GetLocStringById(1205382) || //Gueule
  914. entityName == GetLocStringById(1205389) || //Catfish
  915. entityName == GetLocStringById(1187538) || //Dun Tynne Guard
  916. (entityName == GetLocStringById(1199796) && language == "RU") || //Nazairi Bandit 1/2
  917. (entityName == GetLocStringById(1200141) && language == "RU") || //Nazairi Bandit 2/2
  918. entityName == GetLocStringById(1199660) || //Cael
  919. entityName == GetLocStringById(1165552) || //Redbeard 1/3
  920. entityName == GetLocStringById(1186383) || //Redbeard 2/3
  921. entityName == GetLocStringById(1190140) //Redbeard 3/3
  922. );
  923. }
  924.  
  925. public function UpdateName( enemyName : string )
  926. {
  927. if ( m_lastEnemyName != enemyName )
  928. {
  929. m_lastEnemyName = enemyName;
  930. m_fxSetEnemyName.InvokeSelfOneArg( FlashArgString( m_lastEnemyName ) );
  931. }
  932. }
  933.  
  934. public function SetShowHardLock( set : bool )
  935. {
  936. m_fxSetShowHardLock.InvokeSelfOneArg( FlashArgBool( set ) );
  937. }
  938.  
  939. protected function UpdateScale( scale : float, flashModule : CScriptedFlashSprite ) : bool
  940. {
  941. return false;
  942. }
  943.  
  944. //---=== modFriendlyHUD ===---
  945. private function UpdateQuestIcon( target : CNewNPC )
  946. {
  947. var questIcon : string;
  948.  
  949. if( GetFHUDConfig().hideNPCQuestMarkers )
  950. {
  951. questIcon = "none";
  952. }
  953. else
  954. {
  955. questIcon = GetQuestIconFromMarker( target );
  956. if( questIcon == "none" )
  957. {
  958. questIcon = GetQuestIconFromJournal( target );
  959. }
  960. }
  961. m_fxSetNPCQuestIcon.InvokeSelfOneArg( FlashArgString( questIcon ) );
  962. }
  963.  
  964. private function GetQuestIconFromMarker( target : CNewNPC ) : string
  965. {
  966. var mapPinInstances : array< SCommonMapPinInstance >;
  967. var commonMapManager : CCommonMapManager;
  968. var currentPin : SCommonMapPinInstance;
  969. var targetTags : array< name >;
  970. var i : int;
  971. var questIcon : string;
  972. var mapPinType : name;
  973.  
  974. questIcon = "none";
  975.  
  976. if ( target )
  977. {
  978. targetTags = target.GetTags();
  979.  
  980. if (targetTags.Size() > 0)
  981. {
  982. commonMapManager = theGame.GetCommonMapManager();
  983.  
  984. mapPinType = commonMapManager.GetMapPinTypeByTag( targetTags[0] );
  985. switch ( mapPinType )
  986. {
  987. case 'QuestReturn':
  988. questIcon = "QuestReturn";
  989. break;
  990. case 'QuestGiverStory':
  991. questIcon = "QuestGiverStory";
  992. break;
  993. case 'QuestGiverChapter':
  994. questIcon = "QuestGiverChapter";
  995. break;
  996. case 'QuestGiverSide':
  997. case 'QuestAvailable':
  998. case 'QuestAvailableHoS':
  999. case 'QuestAvailableBaW':
  1000. questIcon = "QuestGiverSide";
  1001. break;
  1002. case 'MonsterQuest':
  1003. questIcon = "MonsterQuest";
  1004. break;
  1005. case 'TreasureQuest':
  1006. questIcon = "TreasureQuest";
  1007. break;
  1008. }
  1009. }
  1010. }
  1011. return questIcon;
  1012. }
  1013.  
  1014. private function GetQuestIconFromJournal( target : CNewNPC ) : string
  1015. {
  1016. var journalManager : CWitcherJournalManager;
  1017. var currentQuest : CJournalQuest;
  1018. var currentPhase : CJournalQuestPhase;
  1019. var currentObjective : CJournalQuestObjective;
  1020. var questsList : array< CJournalBase >;
  1021. var questsCount, qIdx : int;
  1022. var phaseCount, pIdx : int;
  1023. var objCount, oIdx : int;
  1024. var pinsCount, pinIdx : int;
  1025. var currentMappin : CJournalQuestMapPin;
  1026. var questIcon : string;
  1027. var targetTags : array< name >;
  1028. var tagsCount, tIdx : int;
  1029.  
  1030. questIcon = "none";
  1031. if ( target )
  1032. {
  1033. targetTags = target.GetTags();
  1034. tagsCount = targetTags.Size();
  1035. if ( tagsCount > 0 )
  1036. {
  1037. journalManager = theGame.GetJournalManager();
  1038. journalManager.GetActivatedOfType( 'CJournalQuest', questsList );
  1039. questsCount = questsList.Size();
  1040. for( qIdx = 0; qIdx < questsCount; qIdx += 1 )
  1041. {
  1042. currentQuest = (CJournalQuest)questsList[qIdx];
  1043. if( currentQuest && journalManager.GetEntryStatus( currentQuest ) == JS_Active )
  1044. {
  1045. phaseCount = currentQuest.GetNumChildren();
  1046. for( pIdx = 0; pIdx < phaseCount; pIdx += 1 )
  1047. {
  1048. currentPhase = (CJournalQuestPhase)currentQuest.GetChild(pIdx);
  1049. if( currentPhase )
  1050. {
  1051. objCount = currentPhase.GetNumChildren();
  1052. for( oIdx = 0; oIdx < objCount; oIdx += 1 )
  1053. {
  1054. currentObjective = (CJournalQuestObjective)currentPhase.GetChild(oIdx);
  1055. if ( currentObjective && journalManager.GetEntryStatus( currentObjective ) == JS_Active )
  1056. {
  1057. pinsCount = currentObjective.GetNumChildren();
  1058. for( pinIdx = 0; pinIdx < pinsCount; pinIdx += 1 )
  1059. {
  1060. currentMappin = (CJournalQuestMapPin)currentObjective.GetChild(pinIdx);
  1061. if( currentMappin )
  1062. {
  1063. for( tIdx = 0; tIdx < tagsCount; tIdx += 1 )
  1064. {
  1065. if( currentMappin.GetMapPinID() == targetTags[tIdx] )
  1066. {
  1067. switch (currentQuest.GetType())
  1068. {
  1069. case Story:
  1070. questIcon = "QuestGiverStory"; // yellow !
  1071. return questIcon;
  1072. case Chapter:
  1073. questIcon = "QuestGiverChapter"; // white !
  1074. return questIcon;
  1075. case Side:
  1076. questIcon = "QuestGiverSide"; // white !
  1077. return questIcon;
  1078. case MonsterHunt:
  1079. questIcon = "MonsterQuest";
  1080. return questIcon;
  1081. case TreasureHunt:
  1082. questIcon = "TreasureQuest";
  1083. return questIcon;
  1084. default:
  1085. //return "QuestReturn"; //?
  1086. break;
  1087. }
  1088. }
  1089. }
  1090. }
  1091. }
  1092. }
  1093. }
  1094. }
  1095. }
  1096. }
  1097. }
  1098. }
  1099. }
  1100. return questIcon;
  1101. }
  1102. //---=== modFriendlyHUD ===---
  1103. }
  1104.  
  1105. exec function dodgeFeedback()
  1106. {
  1107. var npc : CNewNPC;
  1108.  
  1109. npc = (CNewNPC)thePlayer.GetDisplayTarget();
  1110. if ( npc )
  1111. {
  1112. thePlayer.SetDodgeFeedbackTarget( npc );
  1113. }
  1114. }
  1115.  
  1116. exec function hardlock( set : bool )
  1117. {
  1118. var hud : CR4ScriptedHud;
  1119. var module : CR4HudModuleEnemyFocus;
  1120.  
  1121. hud = (CR4ScriptedHud)theGame.GetHud();
  1122. module = (CR4HudModuleEnemyFocus)hud.GetHudModule("EnemyFocusModule");
  1123. module.SetShowHardLock( set );
  1124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement