Msey
????
offline
Опыт:
67,346Активность: |
замена SCV
Нашел огромное количество классных систем, однако встретил в них рб функции. Мне приходилось работать с scv (многое заменял), но здесь уже высший пилотаж.
И таким образом можно получить любой объект.
Принцип работы функции мне ясен: берется id хендла и каким-то раком переобразовывается обратно в объект. (h - 0x100000) где h = handle объекта, но мб я ошибаюсь Прошу дать примеры решения, ведь они идут в пару строк.
Под катом есть еще ф-ии, которые я хз как заменить
((кат прочие ф-ии
)) |
02.06.2012, 21:30 | #1
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
DragonSpirit
у - уходи
offline
Опыт:
22,625Активность: |
посмотри преобразование через fogstate DioD подобное делал и называл это Shark Engine вроде как |
02.06.2012, 21:47 | #2
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
Msey
????
offline
Опыт:
67,346Активность: |
Нашел наработку (не диода).
Она решила мой первый вопрос.
Исходящий из этого вопрос: будет ли работать эта библиотека, если она находится в кастом коде, а код спелла отдельно, в созданном триггере? будет ли работать макрос? (я до них пока не дошел в мануале) |
02.06.2012, 22:29 | #3
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
DragonSpirit
у - уходи
offline
Опыт:
22,625Активность: |
да |
02.06.2012, 22:45 | #4
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
Msey
????
offline
Опыт:
67,346Активность: |
а с этим как быть? |
02.06.2012, 23:23 | #5
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
DragonSpirit
у - уходи
offline
Опыт:
22,625Активность: |
сохраняй через StringHash в таблицу |
04.06.2012, 16:05 | #6
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
Doc
offline
Опыт:
63,163Активность: |
Ну можно так и оставить лол) Чем кеш не угодил? |
04.06.2012, 16:40 | #7
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
quq_CCCP
Я белый и пушистый!
offline
Опыт:
94,338Активность: |
Msey, Вот типа SCV только на хеше, ну там вроде есть то что тебе нужно)
» код
((код jass
function StoreDataInteger takes handle pKey, string cKey, integer value returns nothing
call SaveInteger(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey), value ) endfunction function StoreDataReal takes handle parentKey, string cKey, real value returns nothing
call SaveReal(bj_lastCreatedHashtable, GetHandleId(parentKey), StringHash(cKey), value ) endfunction function StoreDataBoolean takes handle parentKey, string cKey, boolean value returns nothing
call SaveBoolean(bj_lastCreatedHashtable, GetHandleId(parentKey), S2I(cKey), value ) endfunction function StoreDataString takes handle parentKey, string cKey, string value returns nothing
call SaveStr(bj_lastCreatedHashtable, GetHandleId(parentKey), StringHash(cKey), value ) endfunction function GetStoredDataInteger takes handle pKey, string cKey returns integer
return LoadInteger(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endfunction function GetStoredDataReal takes handle pKey, string cKey returns real
return LoadReal(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endfunction function GetStoredDataBoolean takes handle pKey, string cKey returns boolean
return LoadBoolean(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endfunction function GetStoredDataString takes handle pKey, string cKey returns string
return LoadStr(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endfunction function StoreDataHandle takes handle pKey, string cKey, handle whichHandle returns nothing
if(HaveSavedHandle(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey))) then call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|cffff0000Ошибка!|r По адресу - "+I2S(GetHandleId(pKey))+" x "cKey" записан хендл - " + I2S(GetHandleId(LoadFogStateHandle(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey))))) call RemoveSavedHandle(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endif call SaveFogStateHandle(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey), ConvertFogState(GetHandleId(whichHandle))) endfunction function GetStoredDataUnit takes handle pKey, string cKey returns unit
return LoadUnitHandle(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endfunction function GetStoredDataTrigger takes handle pKey, string cKey returns trigger
return LoadTriggerHandle(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endfunction function GetStoredDataTimer takes handle pKey, string cKey returns timer
return LoadTimerHandle(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endfunction function GetStoredDataEffect takes handle pKey, string cKey returns effect
return LoadEffectHandle(bj_lastCreatedHashtable, GetHandleId(pKey), StringHash(cKey)) endfunction function FlushStoredData takes handle pKey returns nothing
call FlushChildHashtable(bj_lastCreatedHashtable,GetHandleId(pKey)) endfunction )) quq_CCCP добавил:
((код jass
function cfg takes string key returns string return LoadStr(udg_hash,StringHash("config"), StringHash(key)) endfunction )) тут всё просто |
04.06.2012, 17:06 | #8
+0/−2
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
Msey
????
offline
Опыт:
67,346Активность: |
Всё, всем спасибо, разобрался, закрывайте) |
05.06.2012, 13:39 | #9
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|