I have tried, by looking at this: TFS 1.X+ - [C++] item attack speed (attr key not recognized) (https://otland.net/threads/c-item-attack-speed-attr-key-not-recognized.262272/)
What i want:
An attack speed in percentage, where 100% will reduce your attackspeed by half, so if you have 1000ms, it will be 500ms.
I want it to be able to use as a formula as you do with critical, leech etc.
OTCLIENT:
To add Attack Speed Amount both onto otclient which kinda succeded beside that it wont show the number of amount.
SOURCES:
I tried to add attack speed pretty much everywhere as with where leech/crit goes, but! I have no clue on how to make the formula, where to place it or anything, this is what I've added so far.
condition.cpp
enums.h
items.cpp
items.h
luascript.cpp
tools.cpp
What i want:
An attack speed in percentage, where 100% will reduce your attackspeed by half, so if you have 1000ms, it will be 500ms.
I want it to be able to use as a formula as you do with critical, leech etc.
OTCLIENT:
To add Attack Speed Amount both onto otclient which kinda succeded beside that it wont show the number of amount.
SOURCES:
I tried to add attack speed pretty much everywhere as with where leech/crit goes, but! I have no clue on how to make the formula, where to place it or anything, this is what I've added so far.
condition.cpp
C++:
case CONDITION_PARAM_SPECIALSKILL_ATTACKSPEED: {
specialSkills[SPECIALSKILL_ATTACKSPEED] = value;
return true;
}
enums.h
C++:
enum SpecialSkills_t {
SPECIALSKILL_ATTACKSPEED,
SPECIALSKILL_CRITICALHITCHANCE,
SPECIALSKILL_CRITICALHITAMOUNT,
SPECIALSKILL_LIFELEECHCHANCE,
SPECIALSKILL_LIFELEECHAMOUNT,
SPECIALSKILL_MANALEECHCHANCE,
SPECIALSKILL_MANALEECHAMOUNT,
SPECIALSKILL_FIRST = SPECIALSKILL_ATTACKSPEED,
SPECIALSKILL_LAST = SPECIALSKILL_MANALEECHAMOUNT
};
items.cpp
C++:
{"attackspeed", ITEM_PARSE_ATTACKSPEED},
C++:
case ITEM_PARSE_ATTACKSPEED: {
abilities.specialSkills[SPECIALSKILL_ATTACKSPEED] = pugi::cast<int32_t>(valueAttribute.value());
break;
}
items.h
C++:
ITEM_PARSE_ATTACKSPEED,
luascript.cpp
C++:
registerEnum(CONDITION_PARAM_SPECIALSKILL_ATTACKSPEED)
tools.cpp
C++:
case SPECIALSKILL_ATTACKSPEED:
return "attack speed amount";