Skip to content

UjAPI v1.1.33.319

Choose a tag to compare

@UnryzeC UnryzeC released this 24 May 10:15
· 84 commits to main since this release
5f83806

Release

  1. New Constants:
    constant playerunitevent EVENT_PLAYER_UNIT_BUFF_STOLEN = ConvertPlayerUnitEvent(520)
    constant playerunitevent EVENT_PLAYER_UNIT_ABILITY_BLOCKED = ConvertPlayerUnitEvent(521)
    //
    constant unitevent EVENT_UNIT_BUFF_STOLEN = ConvertUnitEvent(522)
    constant unitevent EVENT_UNIT_ABILITY_BLOCKED = ConvertUnitEvent(523)
  2. Removed Natives:
    native CreateProjectileEx takes integer projectileTypeId, real x, real y, unit owner, integer attackIndex returns projectile // Use SetProjectileUnitData instead
    native GetUnitStunCounter takes unit whichUnit returns integer
    native SetUnitStunCounter takes unit whichUnit, integer stunCounter returns nothing
  3. Disabled Natives:
    native GetTriggerBuffSourceAbility takes nothing returns ability // disabled, as it does not work properly.
    native GetTriggerBuffSourceUnit takes nothing returns unit // disabled, as it does not work properly.
  4. New Natives:
    native GetCommandTime takes nothing returns integer // This affects TurnData flushing intervals, the lower the value, the faster it is, default: 50. (originally: <= 1.27a -> 200 | >= 1.27b -> 62 )
    native SetCommandTime takes integer value returns nothing
    //
    native GetGameTime takes timetype whichTimeType, boolean isStart returns integer // isStart -> returns the actual time when game started.
    //
    native RemoveModelFromCache takes string modelPath, boolean includeTextures returns nothing
    native RemoveAllModelsFromCache takes boolean includeTextures returns nothing
    native ClearStrings takes nothing returns nothing
    //
    native GetPlayerAPM takes player whichPlayer returns real
    //
    native CopyAbility takes ability whichAbility returns ability
    native CopyAbilityStats takes ability toAbility, ability fromAbility returns nothing
    native GetSpellTargetAbility takes nothing returns ability // BUFF_STOLEN and ABILITY_BLOCKED events.
    native GetSpellTargetWidget takes nothing returns widget
    native GetSpellTargetBuff takes nothing returns buff // BUFF_STOLEN
    //
    native CopyBuff takes buff whichBuff returns buff
    native CopyBuffStats takes buff toBuff, buff fromBuff returns nothing
    native GetSpellTargetBuff takes nothing returns buff // BUFF_STOLEN and ABILITY_BLOCKED events.
    //
    native CopyProjectile takes projectile whichProjectile returns projectile
    native CopyProjectileStats takes projectile toProjectile, projectile fromProjectile returns nothing
    //
    native IsUnitSnared takes unit whichUnit returns boolean
    // 0 - pause | 1 - invulnerable | 2 - auto attack ignore | 3 - invisibility | 4 - frost | 5 - stone | 6 - ethereal | 7 - magic immunity | 8 - dispel immunity | 9 - uninterruptable (previously stun) | 10 - order
    // 11 - disabled | 12 - disabled magic | 13 - disabled physical | 14 - disabled hidden | 15 - disabled hidden magical | 16 - disabled hidden physical | 17 - silence | 18 - abilities | 19 - buffs | 20 - ground
    native GetUnitControlCount takes unit whichUnit, integer index returns integer
    native SetUnitControlCount takes unit whichUnit, integer index, integer count returns nothing
    // timerIndex: 0 - React | 1 - Cooldown | 2 - Damage Point (delay) | 3 - Backswing | 4 - Guard | 5 - Acquire | 6 - In Combat | 7-15 - Unpathable Target
    // timeType: 0 - Timeout/Duration | 1 - Period | 2 - Remaining | 3 - Elapsed (this cannot be set)
    native GetUnitAttackTimerTimeByIndex takes unit whichUnit, integer timerIndex, integer timeType returns real
    native SetUnitAttackTimerTimeByIndex takes unit whichUnit, integer timerIndex, integer timeType, real time returns nothing
    //
    native ItemAddAbilityByIdEx takes item whichItem, integer abilityTypeId, boolean checkDuplicates returns ability // Only checks item's duplicates.
    native ItemRemoveAbilityByIdEx takes item whichItem, integer abilityTypeId, boolean checkDuplicates returns boolean // Only removes item's duplicates.
  5. Native Changes:
    UnitAddAbilityEx now returns ability instead of boolean.
    //
    UnitAddBuffById now returns buff instead of boolean.
    UnitAddBuffByIdEx now returns buff instead of boolean.
    //
    ItemAddAbilityById now returnw ability instead of boolean.
    //
    CreateProjectile now takes all axis and facing.
    //
    GetUnitStunCounter is now GetUnitUninterruptableCount.
    SetUnitStunCounter is now SetUnitUninterruptableCount.
  6. Added internal desync detector, this one actually correctly reports desyncs.
  7. CAgentTimer.cpp and CAgentTimerExtended.cpp cleaned up.
  8. Re-introduced CNetPacketUnlocker, it wasn't active before. This mostly affects TOTAL amount of data that can be handled at once.
  9. Rewritten Net::NetClient::FlushUnsentTurns, lowered ms delay for < 1.27b from 200/from 62 for 1.27b and 1.28f to 50.
  10. Even more QoL changes and code optimisation.
  11. Added CDataStore::SendEvent hook, now all of the packets are handled by UjAPI.
  12. Added CNetData::SendOutgoingCommands hook, now all commands are handled by UjAPI.
  13. Fixed unit getting paused whenever an item was dropped due to any reason.
  14. Fixed RefreshBuff crash, this was related to incorrect handling in CAgentTimerExtended.
  15. Fixed UnitApplyTimedLife with 'BTLF'.
  16. Rewritten internal CUnit::IsStunned to instead use in-game logic.
  17. Fixed random desync from CreateIllusion/CreateIllusionAtLoc/CreateIllusionFromUnit/CreateIllusionFromUnitEx and from Mirror Image/Wand of Illusions.
  18. Fixed incorrect handling of CAbilityAttributeModSkill based abilities.

Editor Changes:

  1. Fixed -loadfile always launching game and bypassing -launch "Editor" option.
  2. Fixed whole process of CLI World Editor launch, it wasn't reading settings properly.