Skip to content

Releases: UnryzeC/UjAPI

UjAPI v1.1.30.300

16 Mar 09:31
e4165d7
Compare
Choose a tag to compare

Release

  1. New Natives:
    native GetUnitItem takes unit whichUnit, integer itemTypeId returns item
    native GetUnitItemEx takes unit whichUnit, integer itemTypeId, integer index returns item
    //
    native GetItemAbilityByIdEx takes item whichItem, integer abilityTypeId, integer index returns ability
  2. Native Changes:
    StartItemCooldown now no longer takes unit as parameter, as it's now obsolete.
  3. Fixed GetUnitWeaponStringField not working with UNIT_WEAPON_SF_ATTACK_PROJECTILE_ART.
  4. Fixed fatal error when a clone was made from a unit that has no inventory by default.
  5. Fixed GetTriggerFrameMouseButton returning value that is 1 less than it should be.
  6. Removed CUnit::Clone hook, this was causing a crash/desync and other issues for some players.
  7. CAbilityItemIllusion fully rewritten, now it supports > 6 items without aforementioned hook.
  8. CAbilityMirrorImage fully rewritten, now it supports > 6 items without aforementioned hook.
  9. Fixed GetEventIsAttack/Ex returning wrong values.
  10. Fixed GetEventDamageType returning wrong values.
  11. Fixed GetEventPreDamage returning wrong values.
  12. Fixed whosyourdaddy cheat damage modifier.
  13. Fixed SetItemX/Y/Z restoring previous axis if used right after another.
    Note: this bug is new and unrelated to Vanilla.
  14. Fixed SetDestructableX/Y/Z issue, which is same as #11.
  15. Fixed fatal error from IsAbilityUsable.
  16. Fixed fatal error from IsSubmenuOpen.
  17. Fixed OnDeath processing of CAbilityInventory, now it properly drops items that have Drop on Death flag or if inventory itself has Drop on Death flag.
  18. Fixed Item freezing its cooldown, when it is transferred/picked up by someone other than the one who used it.

UjAPI v1.1.29.298

26 Feb 15:01
a0d5c2b
Compare
Choose a tag to compare

Release

  1. Removed extra SetUnitZ native register.
  2. Reworked internal X/Y/Z setting for units, which previously would cause a desync (mainly setting Z) if it was spammed enough

UjAPI v1.1.29.297

25 Feb 10:18
9833c6f
Compare
Choose a tag to compare

Release

  1. Fixed fatal error from SetUnitPositionEx with boolean checkPathing set to true.
  2. Fixed fatal error ordering unit movement after using SetUnitPathingType.

UjAPI v1.1.29.296

23 Feb 09:42
04e338c
Compare
Choose a tag to compare

Release

  1. Fixed GetItemMaxCharges returning current charges instead of max charges.
  2. Fixed SetItemMaxCharges setting current charges instead of max charges.
  3. Fixed inversed CItem::IsUnlimited internal checks that caused ITEM_MOVE and ITEM_STACK from functioning properly.
  4. Fixed fatal error from Artillery hit, this is a new crash caused by enum name clash.

UjAPI v1.1.29.295

22 Feb 10:33
00e0f4d
Compare
Choose a tag to compare

Release

  1. New types:
    type itemdisableflag extends flagtype
  2. New Convertors:
    constant native ConvertItemDisableFlag takes integer i returns itemdisableflag
  3. New Constants:
    constant itemdisableflag ITEM_DISABLE_FLAG_BASIC = ConvertItemDisableFlag(1) // basic disable/enable call.
    constant itemdisableflag ITEM_DISABLE_FLAG_SPELLBOOK = ConvertItemDisableFlag(2) // any ability that contains other abilities.
    constant itemdisableflag ITEM_DISABLE_FLAG_BONUSES = ConvertItemDisableFlag(4) // for complex abilities that provide percent changes.
    constant itemdisableflag ITEM_DISABLE_FLAG_ORDERS = ConvertItemDisableFlag(8) // for active abilities, making item's ability non-usable. Does not prevent item clicking with left/right mouse.
    constant itemdisableflag ITEM_DISABLE_FLAG_DIRECT_BONUSES = ConvertItemDisableFlag(16) // for abilities that only provide stat bonuses.
    constant itemdisableflag ITEM_DISABLE_FLAG_AFFECT_UI = ConvertItemDisableFlag(32) // should ability disable/hide count be even processed.
    constant itemdisableflag ITEM_DISABLE_FLAG_COUNT = ConvertItemDisableFlag(64) // actually inc/dec count when enabled/disabled.
  4. New Natives:
    native IsItemDisabled takes item whichItem returns boolean
    native GetItemDisableFlags takes item whichItem returns integer
  5. Fixed fatal error from picking up runes.
  6. Fixed CreateIllusionFromUnit and CreateIllusionFromUnitEx being locked at 6 item slots.
  7. Fixed default illusions being created from Wand of Illusions and such being locked at 6 item slots.
  8. All illusions now also will disable any item that was disabled on unit they were created from.

UjAPI v1.1.28.291

18 Feb 06:34
8b870b5
Compare
Choose a tag to compare

Release

  1. Fixed a somewhat random fatal error in fully rewritten CUnit::TakeDamage.

UjAPI v1.1.28.290

16 Feb 10:48
5b4b0a2
Compare
Choose a tag to compare

Release

  1. New Types:
    type damageflag extends flagtype
  2. New Convertors:
    constant native ConvertDamageFlag takes integer i returns damageflag
  3. New Constants:
    constant damageflag DAMAGE_FLAG_MELEE = ConvertDamageFlag(0)
    constant damageflag DAMAGE_FLAG_RANGED = ConvertDamageFlag(1)
    constant damageflag DAMAGE_FLAG_IGNORE_SOURCE = ConvertDamageFlag(2)
    constant damageflag DAMAGE_FLAG_CALL_FOR_HELP = ConvertDamageFlag(4)
    constant damageflag DAMAGE_FLAG_EXPLOSION = ConvertDamageFlag(8)
    constant damageflag DAMAGE_FLAG_NOTIFY_ONLY = ConvertDamageFlag(16)
    constant damageflag DAMAGE_FLAG_INVULNERABLE = ConvertDamageFlag(32)
    constant damageflag DAMAGE_FLAG_DONT_CALL_FOR_HELP = ConvertDamageFlag(64)
    constant damageflag DAMAGE_FLAG_ATTACK_ONCE = ConvertDamageFlag(128)
    constant damageflag DAMAGE_FLAG_ATTACK = ConvertDamageFlag(256)
    constant damageflag DAMAGE_FLAG_NO_PLAYER_MESSAGE = ConvertDamageFlag(512)
    constant damageflag DAMAGE_FLAG_NEVER_MISS = ConvertDamageFlag(1024)
    constant damageflag DAMAGE_FLAG_ACTUAL_ATTACK = ConvertDamageFlag(1073741824)
    //
    // These are always reals, even though some are later used as integer/boolean and such, so true/false = 1./0. same goes to integers.
    // Note: these can be used in natives that do not handle levels, since these always exist anyways. Or use ConvertAbilityXField with GetHandleId of these constants.
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_A = ConvertAbilityRealLevelField('adfA')
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_B = ConvertAbilityRealLevelField('adfB')
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_C = ConvertAbilityRealLevelField('adfC')
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_D = ConvertAbilityRealLevelField('adfD')
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_E = ConvertAbilityRealLevelField('adfE')
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_F = ConvertAbilityRealLevelField('adfF')
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_G = ConvertAbilityRealLevelField('adfG')
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_H = ConvertAbilityRealLevelField('adfH')
    constant abilityreallevelfield ABILITY_RLF_DATA_FIELD_I = ConvertAbilityRealLevelField('adfI')
  4. Removed Natives:
    native GetEventDamageExtraFlags takes nothing returns integer
    native GetEventDamageIsExtraFlag takes integer flag returns boolean
    native SetEventDamageExtraFlag takes integer flag, boolean isSet returns boolean
  5. Changed Natives:
    GetProjectileDamage now additionally takes attackIndex
    SetProjectileDamage now additionally takes attackIndex
    GetProjectileDamageType now additionally takes attackIndex
    SetProjectileDamageType now additionally takes attackIndex
  6. New Natives:
    native B2I takes boolean b returns integer
    native B2S takes boolean b returns string
    //
    native ParseTooltip takes string text returns string
    native ParseAbilityTooltipByField takes ability whichAbility, abilitystringfield whichField, integer level returns string
    native ParseAbilityTooltip takes ability whichAbility, string text, integer level returns string
    //
    native IsBuffPaused takes buff whichBuff returns boolean
    //
    // Flags: 1 - basic disable | 2 - affect spellbook abilities | 4 - affect bonuses
    native DisableItem takes item whichItem, boolean hideUI, boolean disable, integer extraFlags returns nothing
    native EnableItem takes item whichItem, boolean showUI, boolean enable, integer extraFlags returns nothing
    //
    native GetEventDamageTypeExtra takes nothing returns damagetype // DEMOLITION is usually related to critical hits.
    native SetEventDamageTypeExtra takes takes damagetype whichDamageType returns boolean
    native SetEventPreDamage takes real returns nothing
    native GetEventPreDamageExtra takes nothing returns real
    native SetEventPreDamageExtra takes real returns nothing
    native GetEventDamageExtra takes nothing returns real // related to crits/bashes, etc.
    native SetEventDamageExtra takes real damage returns nothing
  7. Fixed internal CAbilityInventory::Enable/Disable, now it properly uses rewritten logic of the inventory.
  8. Fixed internal CItem::Disable/Enable, now it uses rewritten logic of the items.
  9. Fixed GetBuffRemainingDuration returning 0 if buff is paused, but unit wasn't.
  10. Fully rewritten CUnit::TakeDamage now DAMAGING/DAMAGED events are processed in a similar manner.
    Note: this should also negate weird interactions with SetEventDamage breaking/crashing the game if initial damage was 0. or if any ability was given in damage thread.
  11. Removed internal text limit for Passives/Learnable/Spellbook ability tooltips.
  12. Ability tooltips are now dynamically processed if provided with specific tags.
    Example: Gives a chance to do more damage on an attack.|n|n|cffffcc00Level %d|r - $DataA$% chance, $DataB$ times normal damage.
    Note 1: this will take DataA and DataB at run-time whenever you hover over the ability. All abilities have DataA - DataI, so you can really let loose.
    Note 2: if ability Id is provided like so: $AOcr,DataA$% then it will instead read base data of that ability.
  13. Item tooltips are now dynamically processed, they are also able to read ability data. If item possesses provided ability, then it will check it directly.
    Example: Increases nearby ranged units' damage by $AIar,DataA,%$%. |nDoes not stack with Trueshot Aura.
    Note: this will read AIar ability from current item and print its actual data, and not base data. If item does NOT contain this ability, it will read base data instead.
  14. Extra note: in the future, an additional "setting" such as "base" may be added, so base reading will be enforceable.

UjAPI v1.1.27.285

03 Feb 09:03
3c4fe93
Compare
Choose a tag to compare

Release

  1. New converters:
    native HandleToDoodad takes handle whichHandle returns doodad
  2. Natives Changes:
    RedrawUnit -> UpdateUnitInvisibilityAlpha
  3. New Natives:
    native CallNative takes string funcName, string params returns integer
    native CallFunction takes string funcName, string signature, string params returns integer
    //
    native GetAxisZEx takes real x, real y, integer estimateLevel, boolean checkSurface, boolean forceWalkableCheck returns real
    native GetTerrainFlagsAt takes real x, real y returns integer
    native GetTerrainHeightAt takes real x, real y returns real // same as GetAxisZEx with both booleans beign false.
    native IsTerrainBordersWaterAt takes real x, real y returns boolean
    native IsWaterAt takes real x, real y returns boolean
    native IsWaterDeepAt takes real x, real y returns boolean
    native GetWaterLevelAt takes real x, real y returns integer
    native GetWaterDepthAt takes real x, real y returns real
    //
    native GetProjectileTypeId takes projectile whichProjectile returns integer
    //
    native GetUnitImage takes unit whichUnit, integer index returns image
    native SetUnitImage takes unit whichUnit, integer index, image whichImage returns nothing
    native GetUnitUbersplat takes unit whichUnit returns ubersplat
    native SetUnitUbersplat takes unit whichUnit, ubersplat whichUbersplat returns nothing
    native IsUnitMovable takes unit whichUnit, boolean checkHoldPosition, boolean checkSleeping returns boolean
  4. Fixed fatal error from SetUnitLife/ManaRegen.
    Note: previously #2 code was just skipped.
  5. Restored and fixed internal CUnit::UpdateRegenState, which was causing the crash.
  6. Fixed Attack related natives fatal errors that were caused by interaction with units that do not have Attack ability.
  7. Fixed Order related events not providing correct information.
  8. Fixed internal error in mouse key conversion that was incorrectly misassigning value for Middle and Right button.
  9. Fixed cooldown indicators being drawn on UI creation, now they are properly hidden as they were supposed to be.
  10. Fixed EVENT_PLAYER_UNIT_BUFF_REMOVED issue causing it not to dispatch.
  11. Fixed Projectile enumeration with EnumProjectilesInArea/Rect.
  12. Fixed Projectile enumeration with HandleListEnumProjectilesInArea/Rect.
  13. Fixed SetProjectileSpeed not affecting actual speed.
  14. Fixed all Projectile enumerations, now they work propeprly.
  15. Fixed fatal error from ExecuteCode.
  16. Fixed fatal error from ExecuteFuncEx.

UjAPI WE Module:

  1. Module now also works with vanilla 1.26a World Editor.

UjAPI v1.1.26.279

11 Jan 08:53
7ec3732
Compare
Choose a tag to compare

Release

  1. Native Changes:
    GetUnitStatbarHeight -> GetUnitOverheadOffset
    SetUnitStatbarHeight -> SetUnitOverheadOffset
    IsAbilityEnabledEx -> IsAbilityOrderEnabled
    SetAbilityEnabledEx -> SetAbilityOrderEnabled
  2. New Natives:
    native GetAspectRatioRelativeX takes real x returns real
    native GetAspectRatioRelativeY takes real y returns real
    //
    native ActivateWidgetCollision takes widget whichWidget, boolean causeInterferenceEvents, boolean isPathingObstacle, boolean liveFootprint returns nothing
    native DeactivateWidgetCollision takes widget whichWidget, boolean causeInterferenceEvents, boolean liveFootprint returns nothing
    //
    native IsUnitLifeRegenEnabled takes unit whichUnit returns boolean
    native SetUnitLifeRegenEnabled takes unit whichUnit, boolean enable returns nothing
    native IsUnitManaRegenEnabled takes unit whichUnit returns boolean
    native SetUnitManaRegenEnabled takes unit whichUnit, boolean enable returns nothing
    native IsUnitIdle takes unit whichUnit returns boolean
  3. Fixed GetMouseScreenRelativeX/Y returning absolute value instead of relative.
  4. Fixed GetMouseScreenAbsoluteX/Y returning relative value instead of absolute.
  5. Fixed SetMouseScreenRelativeX/Y / SetMouseScreenRelativePosition setting position incorrently.
  6. Fixed SetMouseScreenAbsoluteX/Y / SetMouseScreenAbsolutePosition setting position incorrently.
  7. Fixed GetWindowWidth returning incorrect value when game was launched in windowed mode.
  8. Fixed GetWindowHeight returning incorrect value when game was launched in windowed mode.
  9. Fixed GetWindowX/Y returning incorrect value when game was launched in windowed mode.
  10. Fixed GetWindowCenterX/Y returning incorrect value when game was launched in windowed mode.
  11. Fixed initial item button drawing, which would fail for the first unit with inventory.
  12. Fixed random fatal error on item pickup, it was related to incorrect process of ability count.
  13. Items no longer remove abilities on drop, they are instead simply stripped from their owner, so they can be re-used.
  14. SetItemStringField with ITEM_SF_ABILITY_LIST is now instance specific, instead of being global.
  15. Huge inside remake of code, this won't really yield much of a change on performance, just developer's note.

A couple of fatal errors have been fixed, please re-download this version if you encountered issues with previously downloaded one.

UjAPI v1.1.25.276

06 Dec 12:55
5e33032
Compare
Choose a tag to compare

Release

  1. Fixed incorrect creation of Bbsk buff when created via Buff API.
  2. Fixed silent crash whenever any of the Bbsk fields were changed.