Добавлен , опубликован
Карта
Жанр:
Defense
Число игроков:
1-6
Размеры:
128x128
Версия Warcraft:
1.26 - 1.30
Версия карты:
1.5
Защита:
Защищена

Легендарный муму вернулся!

Защитите таурена сами, или позовите до 5 друзей с собой!
30 героев ждут вас!
150 различных предметов помогут вам в вашем приключении!
Соберите легендарный клинок и успокойте врагов муму!

Проведённая работа:

Восстановлена работоспособность карты на патчах 1.26+
Переделаны только функции на основе ReturnBug на функции работающие с Хеш-Таблицей.
Баланс не тронут.

Скриншоты:


Благодарности:

x3pt & hunter_demon - За проделанную работу над картой в своё время.
`
ОЖИДАНИЕ РЕКЛАМЫ...
2
32
5 лет назад
2
нууу, как сказать, карта хорошо подойдёт для того чтобы вызвать чувство ностальгии, у тех, кто её любил или играл в компьютерных клубах
1
29
5 лет назад
1
чувство ностальгии, у тех, кто её любил или играл в компьютерных клубах
А если она мне ещё в клубах не нравилась?))
0
28
5 лет назад
Отредактирован PT153
0
Переделаны только функции на основе ReturnBug на функции работающие с Хеш-Таблицей.
Вот тут поподробней, ведь у хеша раздельные сохранения для boolean, integer, real, string и handle.
Функции их вопроса.
раскрыть
function CS_H2I takes handle h returns integer
return h
return 0
endfunction

function GetAttachedObject takes handle h,string label returns handle
return GetAttachedInt(h,label)
return null
endfunction

function GameCache2Trigger takes gamecache g returns trigger
return g
return null
endfunction

function H2I takes handle h returns integer
return h
return 0
endfunction

function I2U takes integer i returns unit
return i
return null
endfunction

function I2T takes integer t returns trigger
return t
return null
endfunction

function I2G takes integer g returns group
return g
return null
endfunction
3
17
5 лет назад
3
PT153,
Все изменения:
раскрыть
CS_H2I() заменено на GetHandleId
GetAttachedObject() и другие удалены, т.к. в коде не используется
GameCache2Trigger() переделано, сразу изменён тип переменной на gamecache, название не изменено - gg_trg_xxx (gg_trg_MultiDrain, gg_trg_Boomerang_Axes)
H2I и xxxH2I- переделано:
function H2I takes handle h returns integer
  return (GetHandleId(h))
endfunction

//Функции по возвращению int в данные переделаны под ХТ по типу:
function I2X takes integer i returns XXX
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(i))
  return (LoadXXXHandle(udg_typecasting,0,0))
endfunction
:
function I2U takes integer i returns unit
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(i))
  return (LoadUnitHandle(udg_typecasting,0,0))
endfunction

function I2T takes integer t returns trigger
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(t))
  return (LoadTriggerHandle(udg_typecasting,0,0))
endfunction

function I2G takes integer g returns group
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(g))
  return (LoadGroupHandle(udg_typecasting,0,0))
endfunction

function GetAttachedUnit takes handle h,string label returns unit
  local integer i = GetAttachedInt(h,label)
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(i))
  return (LoadUnitHandle(udg_typecasting,0,0))
endfunction

function FCGetHandleUnit takes nothing returns unit
  local integer i=FCGetHandleHandle(GetExpiredTimer(),"dummy")
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(i))
  return (LoadUnitHandle(udg_typecasting,0,0))
endfunction
//(их довольно много, все не припомню)

//CycloneGetHandleHandle - переделано, теперь возвращает юнита вместо handle
function CycloneGetHandleHandle takes handle subject,string name returns unit
  local integer i = GetStoredInteger(CycloneCache(),I2S(CycloneH2I(subject)),name)
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(i))
  return (LoadUnitHandle(udg_typecasting,0,0))
endfunction

//SlowGetHandleHandle() - переделано, теперь возвращает юнита вместо handle
function SlowGetHandleHandle takes handle subject,string name returns unit
  local integer i = GetStoredInteger(SlowCache(),I2S(SlowH2I(subject)),name)
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(i))
  return (LoadUnitHandle(udg_typecasting,0,0))
endfunction

//CycloneGetHandleHandle() - переделано, теперь возвращает юнита вместо handle:
function CycloneGetHandleHandle takes handle subject,string name returns unit
  local integer i = GetStoredInteger(CycloneCache(),I2S(CycloneH2I(subject)),name)
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(i))
  return (LoadUnitHandle(udg_typecasting,0,0))
endfunction
Всё остальное как было, так и осталось.
Сохранение данных в кэш тут реализовано вот так:
раскрыть
function AttachInt takes handle h,string label,integer x returns nothing
  local string k=I2S(GetHandleId(h))
  if x==0 then
    call FlushStoredInteger(udg_cscache,k,label)
  else
    call StoreInteger(udg_cscache,k,label,x)
  endif
endfunction

function AttachReal takes handle h,string label,real x returns nothing
  local string k=I2S(GetHandleId(h))
  if x==0 then
    call FlushStoredReal(udg_cscache,k,label)
  else
    call StoreReal(udg_cscache,k,label,x)
  endif
endfunction

function AttachBoolean takes handle h,string label,boolean x returns nothing
  local string k=I2S(GetHandleId(h))
  if not x then
    call FlushStoredBoolean(udg_cscache,k,label)
  else
    call StoreBoolean(udg_cscache,k,label,x)
  endif
endfunction

function AttachString takes handle h,string label,string x returns nothing
  local string k=I2S(GetHandleId(h))
  if x==""then
    call FlushStoredString(udg_cscache,k,label)
  else
    call StoreString(udg_cscache,k,label,x)
  endif
endfunction

function AttachObject takes handle h,string label,handle x returns nothing
  call AttachInt(h,label,GetHandleId(x))
endfunction

function GetAttachedInt takes handle h,string label returns integer
  local integer r=udg_asetsint
  local integer i
  local integer L
  local string c
  local string num
  if(r>0)then
    if SubString(label,0,1)=="#"then
      set udg_asetsint=r-1
      set i=0
      set num=""
      loop
        set i=i+1
        set c=SubString(label,i,i+1)
        exitwhen(c==";")or(c=="")
        set num=num+c
      endloop
      if c==";"then
        return GetStoredInteger(udg_cscache,I2S(GetHandleId(h))+";"+SubString(label,i+1,StringLength(label)+1),num)
      endif
    endif
  endif
  return GetStoredInteger(udg_cscache,I2S(GetHandleId(h)),label)
endfunction

function GetAttachedUnit takes handle h,string label returns unit
  local integer i = GetAttachedInt(h,label)
  call SaveFogStateHandle(udg_typecasting,0,0,ConvertFogState(i))
  return (LoadUnitHandle(udg_typecasting,0,0))
endfunction
0
28
5 лет назад
0
С фогстейтом прикольно придумано.
Чтобы оставить комментарий, пожалуйста, войдите на сайт.