1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 |
local ERROR = UI_ALERT_CATEGORY_ERROR
local ALERT = UI_ALERT_CATEGORY_ALERT
local CombatEventToSoundId =
{
[ ACTION_RESULT_ABILITY_ON_COOLDOWN ] = SOUNDS . ABILITY_NOT_READY ,
[ ACTION_RESULT_TARGET_OUT_OF_RANGE ] = SOUNDS . ABILITY_TARGET_OUT_OF_RANGE ,
[ ACTION_RESULT_TARGET_NOT_IN_VIEW ] = SOUNDS . ABILITY_TARGET_OUT_OF_LOS ,
[ ACTION_RESULT_CANT_SEE_TARGET ] = SOUNDS . ABILITY_TARGET_OUT_OF_LOS ,
[ ACTION_RESULT_IMMUNE ] = SOUNDS . ABILITY_TARGET_IMMUNE ,
[ ACTION_RESULT_SILENCED ] = SOUNDS . ABILITY_CASTER_SILENCED ,
[ ACTION_RESULT_STUNNED ] = SOUNDS . ABILITY_CASTER_STUNNED ,
[ ACTION_RESULT_BUSY ] = SOUNDS . ABILITY_CASTER_BUSY ,
[ ACTION_RESULT_BAD_TARGET ] = SOUNDS . ABILITY_TARGET_BAD_TARGET ,
[ ACTION_RESULT_TARGET_DEAD ] = SOUNDS . ABILITY_TARGET_DEAD ,
[ ACTION_RESULT_CASTER_DEAD ] = SOUNDS . ABILITY_CASTER_DEAD ,
[ ACTION_RESULT_INSUFFICIENT_RESOURCE ] =
{
[ POWERTYPE_STAMINA ] = SOUNDS . ABILITY_NOT_ENOUGH_STAMINA ,
[ POWERTYPE_MAGICKA ] = SOUNDS . ABILITY_NOT_ENOUGH_MAGICKA ,
[ POWERTYPE_HEALTH ] = SOUNDS . ABILITY_NOT_ENOUGH_HEALTH ,
[ POWERTYPE_ULTIMATE ] = SOUNDS . ABILITY_NOT_ENOUGH_ULTIMATE ,
} ,
[ ACTION_RESULT_FAILED ] = SOUNDS . ABILITY_FAILED ,
[ ACTION_RESULT_IN_COMBAT ] = SOUNDS . ABILITY_FAILED_IN_COMBAT ,
[ ACTION_RESULT_FAILED_REQUIREMENTS ] = SOUNDS . ABILITY_FAILED_REQUIREMENTS ,
[ ACTION_RESULT_FEARED ] = SOUNDS . ABILITY_CASTER_FEARED ,
[ ACTION_RESULT_DISORIENTED ] = SOUNDS . ABILITY_CASTER_DISORIENTED ,
[ ACTION_RESULT_TARGET_TOO_CLOSE ] = SOUNDS . ABILITY_TARGET_TOO_CLOSE ,
[ ACTION_RESULT_WRONG_WEAPON ] = SOUNDS . ABILITY_WRONG_WEAPON ,
[ ACTION_RESULT_TARGET_NOT_PVP_FLAGGED ] = SOUNDS . ABILITY_TARGET_NOT_PVP_FLAGGED ,
[ ACTION_RESULT_PACIFIED ] = SOUNDS . ABILITY_CASTER_PACIFIED ,
[ ACTION_RESULT_LEVITATED ] = SOUNDS . ABILITY_CASTER_LEVITATED ,
[ ACTION_RESULT_REINCARNATING ] = SOUNDS . NONE ,
[ ACTION_RESULT_RECALLING ] = SOUNDS . ABILITY_NOT_READY ,
[ ACTION_RESULT_NO_WEAPONS_TO_SWAP_TO ] = SOUNDS . ABILITY_WEAPON_SWAP_FAIL ,
[ ACTION_RESULT_CANT_SWAP_WHILE_CHANGING_GEAR ] = SOUNDS . ABILITY_WEAPON_SWAP_FAIL ,
[ ACTION_RESULT_MOUNTED ] = SOUNDS . ABILITY_NOT_READY ,
[ ACTION_RESULT_INVALID_JUSTICE_TARGET ] = SOUNDS . ABILITY_INVALID_JUSTICE_TARGET ,
[ ACTION_RESULT_NOT_ENOUGH_INVENTORY_SPACE ] = SOUNDS . NEGATIVE_CLICK ,
[ ACTION_RESULT_IN_HIDEYHOLE ] = SOUNDS . ABILITY_CASTER_STUNNED ,
}
local ExperienceReasonToSoundId =
{
[ PROGRESS_REASON_OVERLAND_BOSS_KILL ] = SOUNDS . OVERLAND_BOSS_KILL ,
[ PROGRESS_REASON_SCRIPTED_EVENT ] = SOUNDS . SCRIPTED_EVENT_COMPLETION ,
}
local TrialEventMappings =
{
[ TRIAL_RESTRICTION_CANNOT_USE_GUILDS ] = true ,
}
local GroupElectionResultToSoundId =
{
[ GROUP_ELECTION_RESULT_ELECTION_WON ] = SOUNDS . GROUP_ELECTION_RESULT_WON ,
[ GROUP_ELECTION_RESULT_ELECTION_LOST ] = SOUNDS . GROUP_ELECTION_RESULT_LOST ,
[ GROUP_ELECTION_RESULT_ABANDONED ] = SOUNDS . GROUP_ELECTION_RESULT_LOST ,
}
ZO_GroupElectionResultToAlertTextOverrides =
{
[ GROUP_ELECTION_RESULT_ELECTION_WON ] =
{
} ,
[ GROUP_ELECTION_RESULT_ELECTION_LOST ] =
{
} ,
}
ZO_GroupElectionDescriptorToRequestAlertText =
{
}
--Return format is
-- Category - The alert category to send the alert to
-- Message - The message to alert
-- SoundId (Optional) - An optional sound id to play along with the message
--If Category or Message is nil, then nothing will be shown. Simply not returning anything tells the system to not do anything.
local AlertHandlers = {
[ EVENT_COMBAT_EVENT ] = function ( result , isError , abilityName , abilityGraphic , abilityActionSlotType , sourceName , sourceType , targetName , targetType , hitValue , powerType , damageType , log )
if playerName == sourceName then
local soundId = CombatEventToSoundId [ result ]
soundId = soundId [ powerType ]
end
if ( log and message ~= "" ) then
elseif ( soundId ~= nil ) then
return ERROR , nil , soundId
end
end
end ,
[ EVENT_EXPERIENCE_UPDATE ] = function ( unitTag , exp , maxExp , reason )
if ( unitTag == "player" ) then
local soundId = ExperienceReasonToSoundId [ reason ]
if ( soundId ) then
return ALERT , nil , soundId
end
end
end ,
[ EVENT_REQUIREMENTS_FAIL ] = function ( errorStringId )
if ( message ~= "" ) then
return ERROR , message , SOUNDS . GENERAL_FAILED_REQUIREMENTS
end
end ,
[ EVENT_ABILITY_REQUIREMENTS_FAIL ] = function ( errorStringId )
if ( message ~= "" ) then
return ERROR , message , SOUNDS . ABILITY_FAILED_REQUIREMENTS
end
end ,
[ EVENT_UI_ERROR ] = function ( stringId )
end ,
[ EVENT_ITEM_ON_COOLDOWN ] = function ( )
end ,
[ EVENT_COLLECTIBLE_USE_RESULT ] = function ( result , isAttemptingActivation )
if result == COLLECTIBLE_USAGE_BLOCK_REASON_NOT_BLOCKED then
local sound = isAttemptingActivation and SOUNDS . COLLECTIBLE_ACTIVATED or SOUNDS . COLLECTIBLE_DEACTIVATED
else
local sound = ( result == COLLECTIBLE_USAGE_BLOCK_REASON_ON_COOLDOWN ) and SOUNDS . COLLECTIBLE_ON_COOLDOWN or SOUNDS . GENERAL_ALERT_ERROR
end
end ,
end
end
end ,
[ EVENT_SIEGE_CREATION_FAILED_CLOSEST_DOOR_ALREADY_HAS_RAM ] = function ( )
return ERROR , GetString ( SI_SIEGE_CREATION_FAILED_CLOSEST_DOOR_ALREADY_HAS_RAM ) , SOUNDS . GENERAL_ALERT_ERROR
end ,
[ EVENT_SIEGE_CREATION_FAILED_NO_VALID_DOOR ] = function ( )
end ,
[ EVENT_SIEGE_PACK_FAILED_INVENTORY_FULL ] = function ( )
end ,
[ EVENT_SIEGE_PACK_FAILED_NOT_CREATOR ] = function ( )
end ,
[ EVENT_SIEGE_BUSY ] = function ( siegeName )
end ,
[ EVENT_SIEGE_FIRE_FAILED_COOLDOWN ] = function ( )
end ,
[ EVENT_SIEGE_FIRE_FAILED_RETARGETING ] = function ( )
end ,
[ EVENT_SIEGE_CONTROL_ANOTHER_PLAYER ] = function ( siegeName )
end ,
[ EVENT_CANNOT_DO_THAT_WHILE_DEAD ] = function ( )
end ,
[ EVENT_CANNOT_CROUCH_WHILE_CARRYING_ARTIFACT ] = function ( artifactName )
return ERROR , zo_strformat ( GetString ( SI_CANNOT_CROUCH_WHILE_CARRYING_ARTIFACT ) , artifactName ) , SOUNDS . GENERAL_ALERT_ERROR
end ,
[ EVENT_NOT_ENOUGH_MONEY ] = function ( )
end ,
[ EVENT_TRADE_FAILED ] = function ( reason )
end ,
[ EVENT_TRADE_ITEM_ADD_FAILED ] = function ( reason , itemName )
return ERROR , zo_strformat ( GetString ( "SI_TRADEACTIONRESULT" , reason ) , itemName ) , SOUNDS . GENERAL_ALERT_ERROR
end ,
[ EVENT_TRADE_ELEVATION_FAILED ] = function ( reason , itemName )
return ERROR , zo_strformat ( GetString ( "SI_TRADEACTIONRESULT" , reason ) , itemName ) , SOUNDS . GENERAL_ALERT_ERROR
end ,
[ EVENT_SLOT_IS_LOCKED_FAILURE ] = function ( )
end ,
[ EVENT_MAIL_SEND_FAILED ] = function ( reason )
if reason ~= MAIL_SEND_RESULT_CANCELED then
return ERROR , zo_strformat ( SI_MAIL_SEND_FAIL , GetString ( "SI_SENDMAILRESULT" , reason ) ) , SOUNDS . GENERAL_ALERT_ERROR
end
end ,
[ EVENT_RESURRECT_RESULT ] = function ( targetCharacterName , reason , targetDisplayName )
if reason ~= RESURRECT_RESULT_SUCCESS then
if reason ~= RESURRECT_RESULT_DECLINED then
return ERROR , zo_strformat ( GetString ( "SI_RESURRECTRESULT" , reason ) , nameToShow ) , SOUNDS . GENERAL_ALERT_ERROR
else
end
end
end ,
[ EVENT_SOUL_GEM_ITEM_CHARGE_FAILURE ] = function ( reason )
end ,
[ EVENT_ITEM_REPAIR_FAILURE ] = function ( reason )
end ,
[ EVENT_MOUNT_FAILURE ] = function ( reason , arg1 )
return ERROR , zo_strformat ( GetString ( "SI_MOUNTFAILUREREASON" , reason ) , arg1 ) , SOUNDS . GENERAL_ALERT_ERROR
end ,
[ EVENT_STORE_FAILURE ] = function ( reason )
end ,
[ EVENT_HOT_BAR_RESULT ] = function ( reason )
end ,
[ EVENT_ABILITY_PROGRESSION_RESULT ] = function ( reason )
end ,
[ EVENT_INTERACT_BUSY ] = function ( )
end ,
[ EVENT_LORE_BOOK_ALREADY_KNOWN ] = function ( bookTitle )
end ,
[ EVENT_INTERACTABLE_LOCKED ] = function ( interactableName )
return ERROR , zo_strformat ( SI_LOCKPICK_NO_KEY_AND_NO_LOCK_PICKS , interactableName ) , SOUNDS . LOCKPICKING_NO_LOCKPICKS
end ,
[ EVENT_INTERACTABLE_IMPOSSIBLE_TO_PICK ] = function ( interactableName )
return ERROR , zo_strformat ( SI_LOCKPICK_IMPOSSIBLE_LOCK , interactableName ) , SOUNDS . LOCKPICKING_NO_LOCKPICKS
end ,
[ EVENT_MISSING_LURE ] = function ( )
end ,
[ EVENT_CANNOT_FISH_WHILE_SWIMMING ] = function ( )
end ,
[ EVENT_GROUP_INVITE_RESPONSE ] = function ( characterName , response , displayName )
if ( response ~= GROUP_INVITE_RESPONSE_ACCEPTED and response ~= GROUP_INVITE_RESPONSE_CONSIDERING_OTHER and response ~= GROUP_INVITE_RESPONSE_IGNORED ) then
if nameToUse == "" then
end
local alertMessage = nameToUse ~= "" and zo_strformat ( GetString ( "SI_GROUPINVITERESPONSE" , response ) , nameToUse ) or GetString ( SI_PLAYER_BUSY )
return ALERT , alertMessage , SOUNDS . GENERAL_ALERT_ERROR
end
end
end ,
[ EVENT_GROUP_INVITE_ACCEPT_RESPONSE_TIMEOUT ] = function ( )
return ERROR , GetString ( "SI_GROUPINVITERESPONSE" , GROUP_INVITE_RESPONSE_GENERIC_JOIN_FAILURE ) , SOUNDS . GENERAL_ALERT_ERROR
end ,
[ EVENT_GROUP_NOTIFICATION_MESSAGE ] = function ( groupMessageCode )
if groupMessageCode == GROUP_MSG_YOU_ARE_NOT_IN_A_GROUP then
elseif groupMessageCode == GROUP_MSG_YOU_ARE_NOT_THE_LEADER then
elseif groupMessageCode == GROUP_MSG_INVALID_MEMBER then
end
end ,
[ EVENT_GROUP_UPDATE ] = function ( )
currentGroupLeaderRawName = ""
currentGroupLeaderDisplayName = ""
end ,
[ EVENT_GROUP_MEMBER_LEFT ] = function ( characterName , reason , isLocalPlayer , isLeader , displayName , actionRequiredVote )
local message = nil
local sound = nil
local hasValidNames = primaryNameToShow ~= "" and secondaryNameToShow ~= ""
local useDefaultReasonText = false
if reason == GROUP_LEAVE_REASON_DISBAND then
if isLeader and not isLocalPlayer then
useDefaultReasonText = true
end
sound = SOUNDS . GROUP_DISBAND
elseif reason == GROUP_LEAVE_REASON_KICKED then
if actionRequiredVote then
if isLocalPlayer then
message = SI_GROUP_ELECTION_KICK_PLAYER_PASSED
elseif hasValidNames then
message = zo_strformat ( SI_GROUP_ELECTION_KICK_MEMBER_PASSED , primaryNameToShow , secondaryNameToShow )
end
else
if isLocalPlayer then
else
useDefaultReasonText = true
end
end
sound = SOUNDS . GROUP_KICK
elseif reason == GROUP_LEAVE_REASON_VOLUNTARY or reason == GROUP_LEAVE_REASON_LEFT_BATTLEGROUND then
if not isLocalPlayer then
useDefaultReasonText = true
end
sound = SOUNDS . GROUP_LEAVE
elseif reason == GROUP_LEAVE_REASON_DESTROYED then
--do nothing, we don't want to show additional alerts for this case
end
if useDefaultReasonText and hasValidNames then
message = zo_strformat ( GetString ( "SI_GROUPLEAVEREASON" , reason ) , primaryNameToShow , secondaryNameToShow )
end
if isLocalPlayer then
currentGroupLeaderRawName = ""
currentGroupLeaderDisplayName = ""
end
return ALERT , message , sound
end ,
-- This event only fires if the characterId of the leader has changed (it's a new leader)
[ EVENT_LEADER_UPDATE ] = function ( leaderTag )
local showAlert = leaderRawName ~= "" and currentGroupLeaderRawName ~= ""
currentGroupLeaderRawName = leaderRawName
local leaderNameToShow = ZO_GetPrimaryPlayerName ( currentGroupLeaderDisplayName , currentGroupLeaderRawName )
if showAlert then
return ALERT , zo_strformat ( SI_GROUP_NOTIFICATION_GROUP_LEADER_CHANGED , leaderNameToShow ) , SOUNDS . GROUP_PROMOTE
end
end ,
[ EVENT_GROUPING_TOOLS_LFG_JOINED ] = function ( locationName )
end ,
[ EVENT_ACTIVITY_QUEUE_RESULT ] = function ( result )
if result ~= ACTIVITY_QUEUE_RESULT_SUCCESS then
end
end ,
[ EVENT_COLLECTIBLE_RENAME_ERROR ] = function ( errorReason )
end ,
[ EVENT_COLLECTIBLE_SET_IN_WATER_ALERT ] = function ( )
end ,
[ EVENT_TRADE_INVITE_FAILED ] = function ( errorReason , inviteeCharacterName , inviteeDisplayName )
if errorReason == TRADE_ACTION_RESULT_IGNORING_YOU then
else
end
end ,
[ EVENT_TRADE_INVITE_CONSIDERING ] = function ( inviterCharacterName , inviterDisplayName )
end ,
[ EVENT_TRADE_INVITE_WAITING ] = function ( inviteeCharacterName , inviteeDisplayName )
end ,
[ EVENT_TRADE_INVITE_DECLINED ] = function ( )
end ,
[ EVENT_TRADE_INVITE_CANCELED ] = function ( )
end ,
[ EVENT_TRADE_CANCELED ] = function ( )
end ,
[ EVENT_TRADE_FAILED ] = function ( )
end ,
[ EVENT_TRADE_SUCCEEDED ] = function ( )
end ,
[ EVENT_DISCOVERY_EXPERIENCE ] = function ( subzoneName , level , previousExperience , currentExperience , rank , previousPoints , currentPoints )
return ALERT , zo_strformat ( SI_SUBZONE_NOTIFICATION_DISCOVER_WHILE_IN_CONVERSATION , subzoneName ) , SOUNDS . OBJECTIVE_DISCOVERED
end
end ,
[ EVENT_TRADING_HOUSE_ERROR ] = function ( errorCode )
if ( errorCode == TRADING_HOUSE_RESULT_CANT_SELL_FOR_OVER_MAX_AMOUNT ) then
return ERROR , zo_strformat ( GetString ( "SI_TRADINGHOUSERESULT" , errorCode ) , MAX_PLAYER_MONEY ) , SOUNDS . GENERAL_ALERT_ERROR
else
end
end ,
[ EVENT_GUILD_BANK_OPEN_ERROR ] = function ( errorCode )
end ,
[ EVENT_GUILD_BANK_TRANSFER_ERROR ] = function ( errorCode )
if ( errorCode == GUILD_BANK_GUILD_TOO_SMALL ) then
end
end ,
[ EVENT_GUILD_KIOSK_ERROR ] = function ( errorCode )
if ( errorCode == GUILD_KIOSK_GUILD_TOO_SMALL ) then
end
end ,
[ EVENT_GUILD_SELF_LEFT_GUILD ] = function ( guildId , guildName )
end
return ALERT , nil , SOUNDS . GUILD_SELF_LEFT
end ,
[ EVENT_PLEDGE_OF_MARA_RESULT ] = function ( result , characterName , displayName )
if ( result ~= PLEDGE_OF_MARA_RESULT_PLEDGED and result ~= PLEDGE_OF_MARA_RESULT_BEGIN_PLEDGE ) then
return ERROR , zo_strformat ( GetString ( "SI_PLEDGEOFMARARESULT" , result ) , userFacingDisplayName ) , SOUNDS . GENERAL_ALERT_ERROR
end
end ,
[ EVENT_TRAIT_LEARNED ] = function ( itemName , traitName )
end
end ,
[ EVENT_STYLE_LEARNED ] = function ( styleIndex , chapterIndex , isDefaultRacialStyle )
if not isDefaultRacialStyle then
if chapterIndex == ITEM_STYLE_CHAPTER_ALL then
else
return ALERT , zo_strformat ( SI_NEW_STYLE_CHAPTER_LEARNED , GetString ( "SI_ITEMSTYLE" , itemStyle ) , GetString ( "SI_ITEMSTYLECHAPTER" , chapterIndex ) )
end
end
end ,
[ EVENT_SMITHING_TRAIT_RESEARCH_COMPLETED ] = function ( craftingSkillType , researchLineIndex , traitIndex )
local traitType = GetSmithingResearchLineTraitInfo ( craftingSkillType , researchLineIndex , traitIndex )
return ALERT , zo_strformat ( SI_FINISHED_SMITHING_TRAIT_RESEARCH , GetString ( "SI_ITEMTRAITTYPE" , traitType ) , researchLineName ) , SOUNDS . SMITHING_FINISH_RESEARCH
end ,
[ EVENT_RECIPE_LEARNED ] = function ( recipeListIndex , recipeIndex )
end ,
[ EVENT_PLAYER_ACTIVATED ] = function ( )
if isChampionBattleLeveled then
end
end
end ,
[ EVENT_ZONE_CHANGED ] = function ( zoneName , subzoneName )
if ( subzoneName ~= "" ) then
elseif ( zoneName ~= "" ) then
end
end ,
[ EVENT_GROUP_VETERAN_DIFFICULTY_CHANGED ] = function ( isVeteranDifficulty )
if isVeteranDifficulty then
return ALERT , GetString ( SI_DUNGEON_DIFFICULTY_CHANGED_TO_VETERAN ) , SOUNDS . DUNGEON_DIFFICULTY_VETERAN
else
end
end ,
[ EVENT_LOGOUT_DISALLOWED ] = function ( quitGame )
if ( not quitGame ) then
end
end ,
[ EVENT_JUSTICE_BEING_ARRESTED ] = function ( quitGame )
if ( logOutDialogOpen or quitGame ) then
end
end ,
[ EVENT_JUMP_FAILED ] = function ( result )
if result ~= JUMP_RESULT_JUMP_FAILED_ZONE_COLLECTIBLE then -- this result is handled in a dialog
end
end ,
[ EVENT_RECIPE_ALREADY_KNOWN ] = function ( result )
end ,
[ EVENT_SCREENSHOT_SAVED ] = function ( directory , filename )
end ,
[ EVENT_INVENTORY_IS_FULL ] = function ( numSlotsRequested , numSlotsFree )
if numSlotsRequested == 1 then
else
return ERROR , zo_strformat ( SI_INVENTORY_ERROR_INSUFFICIENT_SPACE , numSlotsRequested - numSlotsFree ) , SOUNDS . GENERAL_ALERT_ERROR
end
end ,
[ EVENT_BANK_IS_FULL ] = function ( )
end ,
[ EVENT_QUEST_LOG_IS_FULL ] = function ( )
end ,
if reasonString ~= "" then
return ERROR , reasonString , SOUNDS . GENERAL_ALERT_ERROR
end
end ,
[ EVENT_PLAYER_DEAD ] = function ( )
if ( not ( isAVADeath or isBattleGroundDeath or isDuelingDeath ) ) then
end
end ,
[ EVENT_INPUT_LANGUAGE_CHANGED ] = function ( )
return ALERT , zo_strformat ( SI_ALERT_INPUT_LANGUAGE_CHANGE , GetKeyboardLayout ( ) ) , SOUNDS . GENERAL_ALERT_ERROR
end ,
[ EVENT_CAMPAIGN_ASSIGNMENT_RESULT ] = function ( result )
if resultString ~= "" then
return ERROR , resultString , SOUNDS . GENERAL_ALERT_ERROR
end
end ,
[ EVENT_CAMPAIGN_UNASSIGNMENT_RESULT ] = function ( result )
if resultString ~= "" then
end
end ,
[ EVENT_QUEUE_FOR_CAMPAIGN_RESPONSE ] = function ( response )
if responseString ~= "" then
return ERROR , responseString , SOUNDS . GENERAL_ALERT_ERROR
end
end ,
[ EVENT_JUSTICE_BOUNTY_PAYOFF_AMOUNT_UPDATED ] = function ( oldBounty , newBounty , isInitialize )
if not isInitialize then
if ( newBounty > oldBounty ) then
elseif ( newBounty == 0 and oldBounty ~= 0 ) then
else
end
end
end ,
[ EVENT_JUSTICE_GOLD_PICKPOCKETED ] = function ( goldAmount )
end ,
[ EVENT_JUSTICE_PICKPOCKET_FAILED ] = function ( )
end ,
[ EVENT_LOOT_RECEIVED ] = function ( receivedBy , itemName , quantity , itemSound , lootType , receivedBySelf , isPickpocketLoot )
if ( receivedBySelf and isPickpocketLoot ) then
end
end ,
[ EVENT_DYE_STAMP_USE_FAIL ] = function ( reason )
if reason ~= DYE_STAMP_USE_RESULT_NONE then
end
end ,
[ EVENT_SAVE_GUILD_RANKS_RESPONSE ] = function ( guildId , result )
if result ~= SOCIAL_RESULT_NO_ERROR then
end
end ,
[ EVENT_PICKPOCKET_TOO_FAR ] = function ( )
end ,
[ EVENT_PICKPOCKET_OUT_OF_POSITION ] = function ( )
end ,
[ EVENT_PICKPOCKET_ON_COOLDOWN ] = function ( )
end ,
[ EVENT_PICKPOCKET_SUSPICIOUS ] = function ( )
end ,
[ EVENT_JUSTICE_NPC_SHUNNING ] = function ( )
end ,
[ EVENT_TRIAL_FEATURE_RESTRICTED ] = function ( restrictionType )
if TrialEventMappings [ restrictionType ] then
end
end ,
[ EVENT_STUCK_ERROR_ON_COOLDOWN ] = function ( )
local cooldownText = ZO_FormatTime ( GetStuckCooldown ( ) , TIME_FORMAT_STYLE_COLONS , TIME_FORMAT_PRECISION_TWELVE_HOUR )
local cooldownRemainingText = ZO_FormatTimeMilliseconds ( GetTimeUntilStuckAvailable ( ) , TIME_FORMAT_STYLE_COLONS , TIME_FORMAT_PRECISION_TWELVE_HOUR )
end ,
[ EVENT_STUCK_ERROR_ALREADY_IN_PROGRESS ] = function ( )
end ,
[ EVENT_STUCK_ERROR_IN_COMBAT ] = function ( )
end ,
[ EVENT_STUCK_ERROR_INVALID_LOCATION ] = function ( )
end ,
[ EVENT_STUCK_CANCELED ] = function ( )
end ,
[ EVENT_RIDING_SKILL_IMPROVEMENT ] = function ( ridingSkill , previous , current , source )
if source == RIDING_TRAIN_SOURCE_ITEM then
local text = zo_strformat ( SI_RIDING_SKILL_IMPROVEMENT_ALERT , GetString ( "SI_RIDINGTRAINTYPE" , ridingSkill ) )
end
end ,
[ EVENT_QUICK_REPORT_TICKET_SENT ] = function ( )
end ,
[ EVENT_QUICK_REPORT_ALREADY_REPORTED ] = function ( )
end ,
if soundId == "" then
soundId = nil
end
end ,
[ EVENT_TUTORIALS_RESET ] = function ( )
end ,
[ EVENT_GROUP_ELECTION_FAILED ] = function ( failureType , descriptor )
if failureType ~= GROUP_ELECTION_FAILURE_NONE then
end
end ,
[ EVENT_GROUP_ELECTION_RESULT ] = function ( resultType , descriptor )
if resultType ~= GROUP_ELECTION_RESULT_IN_PROGRESS and resultType ~= GROUP_ELECTION_RESULT_NOT_APPLICABLE then
--Try to find override messages based on the descriptor
local alertTextOverrideLookup = ZO_GroupElectionResultToAlertTextOverrides [ resultType ]
if alertTextOverrideLookup then
end
--No override found
if electionType == GROUP_ELECTION_TYPE_KICK_MEMBER then
if resultType == GROUP_ELECTION_RESULT_ELECTION_LOST then
else
--Successful kicks are handled in the GROUP_MEMBER_LEFT alert
return
end
end
end
--No specific behavior found, so just do the generic alert for the result
end
end
end
end
end ,
[ EVENT_GROUP_ELECTION_REQUESTED ] = function ( descriptor )
if descriptor then
end
end
end ,
[ EVENT_DUEL_INVITE_FAILED ] = function ( reason , targetCharacterName , targetDisplayName )
if userFacingName then
return ERROR , zo_strformat ( GetString ( "SI_DUELINVITEFAILREASON" , reason ) , userFacingName ) , SOUNDS . GENERAL_ALERT_ERROR
else
end
end ,
[ EVENT_DUEL_INVITE_RECEIVED ] = function ( inviterCharacterName , inviterDisplayName )
end ,
[ EVENT_DUEL_INVITE_SENT ] = function ( inviteeCharacterName , inviteeDisplayName )
end ,
[ EVENT_DUEL_INVITE_ACCEPTED ] = function ( )
end ,
[ EVENT_DUEL_INVITE_DECLINED ] = function ( )
end ,
[ EVENT_DUEL_INVITE_CANCELED ] = function ( )
end ,
[ EVENT_CROWN_CRATE_OPEN_RESPONSE ] = function ( crownCrateId , openResponse )
if openResponse ~= LOOT_CRATE_OPEN_RESPONSE_SUCCESS then
if openResponse == LOOT_CRATE_OPEN_RESPONSE_FAIL_NO_INVENTORY_SPACE then
end
return ERROR , errorText , SOUNDS . GENERAL_ALERT_ERROR
end
end ,
[ EVENT_GROUPING_TOOLS_READY_CHECK_CANCELLED ] = function ( reason )
if reason ~= LFG_READY_CHECK_CANCEL_REASON_NOT_IN_READY_CHECK then
end
end ,
[ EVENT_STACKED_ALL_ITEMS_IN_BAG ] = function ( )
end ,
[ EVENT_ACTION_SLOT_ABILITY_USED_WRONG_WEAPON ] = function ( weaponConfigType )
return ALERT , zo_strformat ( SI_ERROR_WRONG_WEAPON_EQUIPPED_FOR_SKILL , GetString ( "SI_WEAPONCONFIGTYPE" , weaponConfigType ) )
end ,
[ EVENT_HOUSING_ADD_PERMISSIONS_FAILED ] = function ( userGroup , attemptedName )
if userGroup == HOUSE_PERMISSION_USER_GROUP_INDIVIDUAL then
return ALERT , zo_strformat ( SI_HOUSING_ADD_PERMISSIONS_FAILED_INDIVIDUAL , ZO_FormatUserFacingDisplayName ( attemptedName ) )
elseif userGroup == HOUSE_PERMISSION_USER_GROUP_GUILD then
end
end ,
[ EVENT_HOUSING_ADD_PERMISSIONS_CANT_ADD_SELF ] = function ( )
end ,
[ EVENT_HOUSING_LOAD_PERMISSIONS_RESULT ] = function ( loadResult )
end ,
[ EVENT_HOUSING_EDITOR_REQUEST_RESULT ] = function ( result )
if result ~= HOUSING_REQUEST_RESULT_SUCCESS then
end
end ,
[ EVENT_PLAYER_EMOTE_FAILED_PLAY ] = function ( result )
end ,
[ EVENT_BATTLEGROUND_INACTIVITY_WARNING ] = function ( )
end ,
}
return AlertHandlers
end
if not playerName then
if tag == "player" then
end
end
end
return ZO_Menu_WasLastCommandFromMenu ( ) or ( error ~= SOCIAL_RESULT_ACCOUNT_NOT_FOUND and error ~= SOCIAL_RESULT_CHARACTER_NOT_FOUND )
end
end
end
end |