Добавлен , опубликован
//============================================================================
// Jass Data API
//
native GetHandleCount									takes nothing returns integer
native GetNextHandleIndex								takes nothing returns integer
//

//============================================================================
// Execution API
//
native IsOperationLimitEnabled							takes nothing returns boolean
native EnableOperationLimit								takes boolean enable returns nothing
native ExecuteCode										takes code c returns nothing
native ExecuteFuncEx									takes string funcName returns nothing
//

//============================================================================
// Utility API
//

// Math API
native MathRound										takes real r returns integer

native MathRealRound									takes real r returns real
native MathRealFloor									takes real r returns real
native MathRealCeil										takes real r returns real
native MathRealAbs										takes real r returns real
native MathRealLog										takes real r returns real
native MathRealLn										takes real r returns real
native MathRealMin										takes real a, real b returns real
native MathRealMax										takes real a, real b returns real
native MathRealSign										takes real r returns integer

native MathIntegerAbs									takes integer i returns integer
native MathIntegerLog									takes integer i returns real
native MathIntegerLn									takes integer i returns real
native MathIntegerMin									takes integer a, integer b returns integer
native MathIntegerMax									takes integer a, integer b returns integer
native MathIntegerSign									takes integer i returns integer

// Angle / Axis / Point API | All natives operate in Degrees!

// These natives act identical to basic Sinc/Cos/Tan/etc. but they take degrees instead of radians, so you won't need to do Ded2Rad or Rad2Deg in multiple functions.
native MathSinDeg										takes real r returns real
native MathCosDeg										takes real r returns real
native MathTanDeg										takes real r returns real

native MathPointProjectionX								takes real x, real angle, real distance returns real
native MathPointProjectionY								takes real y, real angle, real distance returns real
native MathAngleBetweenPoints							takes real fromX, real fromY, real toX, real toY returns real
native MathDistanceBetweenPoints						takes real fromX, real fromY, real toX, real toY returns real
native MathAngleBetweenLocations						takes location fromLoc, location toLoc returns real
native MathDistanceBetweenLocations						takes location fromLoc, location toLoc returns real

native GetAxisZ											takes real x, real y returns real
//

// String API
native StringContains									takes string s, string whichString, boolean caseSensitive returns boolean
native StringFind										takes string s, string whichString, boolean caseSensitive returns integer
native StringFindFirstOf								takes string s, string whichString, boolean caseSensitive returns integer
native StringFindFirstNotOf								takes string s, string whichString, boolean caseSensitive returns integer
native StringFindLastOf									takes string s, string whichString, boolean caseSensitive returns integer
native StringFindLastNotOf								takes string s, string whichString, boolean caseSensitive returns integer
//

// Time API
native GetUjAPIVersion									takes nothing returns string
native GetSystemTime									takes timetype whichTimeType returns integer
native GetLocalTime										takes timetype whichTimeType returns integer
//

// Screen/Window API
native SetScreenFieldOfView								takes real fov returns nothing
native SetWidescreenState								takes boolean flag returns nothing

native IsWindowActive 									takes nothing returns boolean
native GetWindowWidth 									takes nothing returns integer
native GetWindowHeight 									takes nothing returns integer
native GetClientWidth 									takes nothing returns integer
native GetClientHeight 									takes nothing returns integer
native GetWindowX 										takes nothing returns integer
native GetWindowY 										takes nothing returns integer
native GetWindowCenterX 								takes nothing returns integer
native GetWindowCenterY 								takes nothing returns integer
//

// Mouse API
native GetMouseScreenX			 						takes nothing returns real
native GetMouseScreenY			 						takes nothing returns real

native SetMouseScreenX			 						takes real x returns nothing
native SetMouseScreenY			 						takes real y returns nothing
native SetMouseScreenPosition			 				takes real x, real y returns nothing

native GetMouseScreenPixelX			 					takes nothing returns integer
native GetMouseScreenPixelY			 					takes nothing returns integer

native SetMouseScreenPixelX			 					takes integer x returns nothing
native SetMouseScreenPixelY			 					takes integer y returns nothing
native SetMouseScreenPixelPosition			 			takes integer x, integer y returns nothing

native GetMouseWorldX			 						takes nothing returns real
native GetMouseWorldY			 						takes nothing returns real
native GetMouseWorldZ			 						takes nothing returns real
//

// Chat API
native DisplayChatMessage								takes player whichPlayer, integer recipient, string message returns nothing
native DisplayTimedChatMessage							takes player whichPlayer, integer recipient, real duration, string message returns nothing
//

// Handle API
// This function is meant mostly for debugging, for example, to get all units in the map pass '+w3u' as agentBaseTypeId, '+ply' for players, '+mdb' for multiboards, '+frm' for frames accessed/created from jass/lua.
native GetHandleReferenceCount							takes handle whichHandle returns integer
native GetHandleBaseTypeId								takes handle whichHandle returns integer // this returns '+w3u' from unit, if it was passed as handle, and so on.
native GetHandleBaseTypeName							takes handle whichHandle returns string // this returns CUnit from unit, if it was passed as handle, and so on.

native GetFilterHandle									takes nothing returns handle
native GetEnumHandle									takes nothing returns handle

native EnumHandlesOfType								takes integer handleBaseTypeId, boolexpr filter, code handlerFunc returns nothing
//

//============================================================================
// Sync API
//

// Variable Sync API
native GetSyncedVariableType							takes nothing returns variabletype
native GetSyncedVariableName							takes nothing returns string
native GetSyncedInteger									takes nothing returns integer
native GetSyncedReal									takes nothing returns real
native GetSyncedString									takes nothing returns string
native GetSyncedHandle									takes nothing returns handle
native GetSyncedBoolean									takes nothing returns boolean

native SyncInteger             							takes string variableName returns nothing
native SyncReal             							takes string variableName returns nothing
native SyncString             							takes string variableName returns nothing
native SyncHandle             							takes string variableName returns nothing
native SyncBoolean             							takes string variableName returns nothing

native TriggerRegisterPlayerVariableSyncEvent           takes trigger whichTrigger, player whichPlayer, string variableName returns event
//

// Hashtable Sync API
native GetSyncSavedVariableType							takes nothing returns variabletype
native GetSyncSavedHashtable							takes nothing returns hashtable
native GetSyncSavedParentKey							takes nothing returns integer
native GetSyncSavedChildKey								takes nothing returns integer

native SyncSavedInteger             					takes hashtable table, integer parentKey, integer childKey returns nothing
native SyncSavedReal             						takes hashtable table, integer parentKey, integer childKey returns nothing
native SyncSavedString             						takes hashtable table, integer parentKey, integer childKey returns nothing
native SyncSavedHandle             						takes hashtable table, integer parentKey, integer childKey returns nothing
native SyncSavedBoolean             					takes hashtable table, integer parentKey, integer childKey returns nothing

native TriggerRegisterPlayerHashtableDataSyncEvent      takes trigger whichTrigger, player whichPlayer, hashtable whichHashtable returns event
//

// Prefix Sync API
native GetTriggerSyncPrefix                     		takes nothing returns string
native GetTriggerSyncData                       		takes nothing returns string

native SendSyncData                             		takes string prefix, string data returns boolean

native TriggerRegisterPlayerSyncEvent           		takes trigger whichTrigger, player whichPlayer, string prefix, boolean fromServer returns event
//

// Key/KeyEvent API
native IsKeyPressed										takes oskeytype key returns boolean
native IsMouseKeyPressed								takes mousebuttontype mouseKey returns boolean

native GetTriggerPlayerKey                      		takes nothing returns oskeytype
native GetTriggerPlayerMouseButton             			takes nothing returns mousebuttontype
native GetTriggerPlayerMetaKey                  		takes nothing returns integer
native GetTriggerPlayerIsKeyDown                		takes nothing returns boolean

native TriggerRegisterPlayerKeyEvent            		takes trigger whichTrigger, player whichPlayer, oskeytype whichKey, integer whichMetaKey, boolean isKeyDown returns event
//

// Mouse Event API | For use with EVENT_PLAYER_MOUSE_MOVE
native GetTriggerPlayerMouseWorldX						takes nothing returns real
native GetTriggerPlayerMouseWorldY						takes nothing returns real
native GetTriggerPlayerMouseWorldZ						takes nothing returns real

native GetTriggerPlayerMouseScreenX						takes nothing returns real
native GetTriggerPlayerMouseScreenY						takes nothing returns real
//
`
ОЖИДАНИЕ РЕКЛАМЫ...
0
20
1 год назад
0
Тема переделана из API Трекейблов в API Утилит, здесь будет большинство функций, включая новые функции связанные со синхом:
native SyncInteger             							takes string variableName returns nothing
native SyncReal             							takes string variableName returns nothing
native SyncBoolean             							takes string variableName returns nothing
native SyncString             							takes string variableName returns nothing
native SyncHandle             							takes string variableName returns nothing

native SyncSavedInteger             					takes hashtable table, integer parentKey, integer childKey returns nothing
native SyncSavedReal             						takes hashtable table, integer parentKey, integer childKey returns nothing
native SyncSavedBoolean             					takes hashtable table, integer parentKey, integer childKey returns nothing
native SyncSavedHandle             						takes hashtable table, integer parentKey, integer childKey returns nothing
native SyncSavedString             						takes hashtable table, integer parentKey, integer childKey returns nothing
Чтобы оставить комментарий, пожалуйста, войдите на сайт.