[8.54] Attack Speed
[8.54] Attack Speed
Witam.
Przedstawiam wam kod na skill Attack Speed.
w player.cpp szukamy:
Zamieniamy na:
W creature.h szukamy
Zamieniamy na:
Objaśnienia:
Pozdrawiam
Przedstawiam wam kod na skill Attack Speed.
w player.cpp szukamy:
- Kod:
uint32_t Player::getAttackSpeed()
{
Item* weapon = getWeapon();
if(weapon && weapon->getAttackSpeed() != 0)
return weapon->getAttackSpeed();
return vocation->getAttackSpeed();
}
Zamieniamy na:
- Kod:
uint32_t Player::getAttackSpeed()
{
uint32_t attackSpeed = vocation->getAttackSpeed();
uint32_t skilll = getSkill(SKILL_AXE, SKILL_LEVEL);
Item* weapon = getWeapon();
if(skilll > 150)
skilll = 150;
if(weapon && weapon->getAttackSpeed() != 0)
attackSpeed = weapon->getAttackSpeed();
return attackSpeed - (skilll * 10);
}
W creature.h szukamy
- Kod:
#define EVENT_CREATURECOUNT 10
#define EVENT_CREATURE_THINK_INTERVAL 500
Zamieniamy na:
- Kod:
#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 100
Objaśnienia:
- Kod:
if(skilll > 150)
skilll = 150;
-Jeżeli nasz skill przekroczy wartość 150 zostaje przywrócony do wartości 150, czyli maksymalnie możemy osiągnąć 150 attack speed
return attackSpeed - (skilll * 10);
-Co każdy kolejny punkt skilla wartość naszego AS (podstawowa 2000) spada o 10, czym niższa wartość tym szybciej bijemy, więc na 150 AS : 2000 - 150*10 = 500
Pozdrawiam
Anastazjusz- Moderator
- Liczba postów : 12
Join date : 14/11/2012
Permissions in this forum:
Nie możesz odpowiadać w tematach
|
|