[8.54] System 2 broni
[8.54] System 2 broni
Witam.
Przedstawiam wam kod dzięki któremu nasz dmg będzie wzmacniany nie przez 1, a przez 2 bronie jednocześnie.
Testowane na TFS 0.3.6pl
W player.cpp znajdź
Znajdziesz 2 takie linijki, obydwie zastąp:
W weapons.h znajdź:
I poniżej wklej:
Następnie w weapons.cpp znajdź:
I zamień na:
Skompiluj.
Pozdrawiam
Przedstawiam wam kod dzięki któremu nasz dmg będzie wzmacniany nie przez 1, a przez 2 bronie jednocześnie.
Testowane na TFS 0.3.6pl
W player.cpp znajdź
- Kod:
ret = RET_CANONLYUSEONEWEAPON;
Znajdziesz 2 takie linijki, obydwie zastąp:
- Kod:
ret = RET_NOERROR;
W weapons.h znajdź:
- Kod:
const Weapon* getWeapon(const Item* item) const;
I poniżej wklej:
- Kod:
static int32_t getAttackLeft;
static int32_t getAttackRigth;
static int32_t getLeftExtraAttack;
static int32_t getRigthExtraAttack;
Następnie w weapons.cpp znajdź:
- Kod:
int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
{
int32_t attackSkill = player->getWeaponSkill(item);
int32_t attackValue = std::max((int32_t)0, (int32_t(item->getAttack() + item->getExtraAttack()) - elementDamage));
float attackFactor = player->getAttackFactor();
I zamień na:
- Kod:
int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
{
int32_t getAttackLeft;
int32_t getAttackRigth;
int32_t getLeftExtraAttack;
int32_t getRigthExtraAttack;
getAttackLeft = 0;
getAttackRigth = 0;
getLeftExtraAttack = 0;
getRigthExtraAttack = 0;
if (getAttackLeft == 0)
{
if (player->getInventoryItem(SLOT_LEFT) != NULL)
{
getAttackLeft = player->getInventoryItem(SLOT_LEFT)->getAttack();
getLeftExtraAttack = player->getInventoryItem(SLOT_LEFT)->getExtraAttack();
}
else if (player->getInventoryItem(SLOT_LEFT) == NULL)
{
getAttackLeft = 0;
getLeftExtraAttack = 0;
}
}
if (getAttackRigth == 0)
{
if (player->getInventoryItem(SLOT_RIGHT) != NULL)
{
getAttackRigth = player->getInventoryItem(SLOT_RIGHT)->getAttack();
getRigthExtraAttack = player->getInventoryItem(SLOT_RIGHT)->getExtraAttack();
}
else if (player->getInventoryItem(SLOT_RIGHT) == NULL)
{
getAttackRigth = 0;
getRigthExtraAttack = 0;
}
}
int32_t attackValue = std::max((int32_t)0, (int32_t)((getAttackLeft + getLeftExtraAttack + getAttackRigth + getRigthExtraAttack) - elementDamage));
int32_t attackSkill = player->getWeaponSkill(item);
float attackFactor = player->getAttackFactor();
Skompiluj.
Pozdrawiam
Anastazjusz- Moderator
- Liczba postów : 12
Join date : 14/11/2012
Similar topics
» [NPC]Egg System
» [8.54] Absorb System
» Reborn System
» [System]Offline Training
» [Mods]System Uśmieszków
» [8.54] Absorb System
» Reborn System
» [System]Offline Training
» [Mods]System Uśmieszków
Permissions in this forum:
Nie możesz odpowiadać w tematach
|
|