mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
Weapon Damage property; Auto-attack for magical weapons;
This commit is contained in:
parent
bb4a84d51a
commit
f87261b1bb
12 changed files with 70 additions and 14 deletions
|
@ -10,7 +10,7 @@ class skillDef_119Def
|
|||
|
||||
def onFinish( player, target )
|
||||
{
|
||||
player.handleScriptSkill( STD_DAMAGE, 119, 30, 0, target );
|
||||
player.handleScriptSkill( STD_DAMAGE, 119, 140, 0, target );
|
||||
}
|
||||
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
// Skill Name: Sprint
|
||||
// Skill ID: 3
|
||||
// Skill Name: Cure
|
||||
// Skill ID: 120
|
||||
|
||||
class skillDef_120Def
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ class skillDef_120Def
|
|||
|
||||
def onFinish( player, target )
|
||||
{
|
||||
player.handleScriptSkill( STD_HEAL, 120, 1000, 0, target );
|
||||
player.handleScriptSkill( STD_HEAL, 120, 450, 0, target );
|
||||
}
|
||||
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
// Skill Name: Sprint
|
||||
// Skill ID: 3
|
||||
// Skill Name: Aero
|
||||
// Skill ID: 121
|
||||
|
||||
class skillDef_121Def
|
||||
{
|
|
@ -1,5 +1,5 @@
|
|||
// Skill Name: Sprint
|
||||
// Skill ID: 3
|
||||
// Skill Name: Stone II
|
||||
// Skill ID: 127
|
||||
|
||||
class skillDef_127Def
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ class skillDef_127Def
|
|||
|
||||
def onFinish( player, target )
|
||||
{
|
||||
player.handleScriptSkill( STD_DAMAGE, 127, 1000, 0, target );
|
||||
player.handleScriptSkill( STD_DAMAGE, 127, 200, 0, target );
|
||||
}
|
||||
|
||||
};
|
18
bin/scripts/chai/skill/cnj/skillDef_128.chai
Normal file
18
bin/scripts/chai/skill/cnj/skillDef_128.chai
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Skill Name: Repose
|
||||
// Skill ID: 128
|
||||
|
||||
class skillDef_128Def
|
||||
{
|
||||
def skillDef_128Def()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
def onFinish( player, target )
|
||||
{
|
||||
target.addStatusEffectByIdIfNotExist(3, 30000, 0);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
GLOBAL skillDef_128 = skillDef_128Def();
|
18
bin/scripts/chai/skill/pgl/skillDef_53.chai
Normal file
18
bin/scripts/chai/skill/pgl/skillDef_53.chai
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Skill Name: Bootshine
|
||||
// Skill ID: 53
|
||||
|
||||
class skillDef_53Def
|
||||
{
|
||||
def skillDef_53Def()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
def onFinish( player, target )
|
||||
{
|
||||
player.handleScriptSkill( STD_DAMAGE, 53, 140, 0, target );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
GLOBAL skillDef_53 = skillDef_53Def();
|
|
@ -1,5 +1,5 @@
|
|||
// Skill Name: Sprint
|
||||
// Skill ID: 3
|
||||
// Skill Name: Return
|
||||
// Skill ID: 6
|
||||
|
||||
class skillDef_6Def
|
||||
{
|
||||
|
|
|
@ -426,6 +426,7 @@ boost::shared_ptr< Core::Data::ItemInfo >
|
|||
info->model_primary = getField< uint64_t >( row, 45 );
|
||||
info->model_secondary = getField< uint64_t >( row, 46 );
|
||||
info->physical_damage = getField< uint16_t >( row, 49 );
|
||||
info->magical_damage = getField< uint16_t >( row, 50 );
|
||||
info->delayMs = getField< uint16_t >( row, 51 );
|
||||
info->is_unique = getField< int16_t >( row, 64 ) != 0 ? true : false;
|
||||
info->is_untradeable = getField< uint8_t >( row, 65 ) != 0 ? true : false;
|
||||
|
|
|
@ -211,8 +211,9 @@ namespace Core {
|
|||
uint64_t model_primary; //28
|
||||
uint64_t model_secondary; //29
|
||||
uint16_t physical_damage; //49
|
||||
uint16_t magical_damage; //50
|
||||
uint16_t delayMs; //51
|
||||
uint32_t class_job_requirement; //58
|
||||
uint16_t delayMs; //59
|
||||
bool is_unique; //72
|
||||
bool is_untradeable; //73
|
||||
uint32_t class_job_index; //86
|
||||
|
|
|
@ -1462,7 +1462,7 @@ void Core::Entity::Player::autoAttack( ActorPtr pTarget )
|
|||
//uint64_t tick = Util::getTimeMs();
|
||||
//srand(static_cast< uint32_t >(tick));
|
||||
|
||||
uint32_t damage = mainWeap->getAutoAttackDmg() + rand() % 12;
|
||||
uint32_t damage = mainWeap->getAutoAttackDmg();
|
||||
uint32_t variation = 0 + rand() % 3;
|
||||
|
||||
if( getClass() == 5 || getClass() == 23 || getClass() == 31 )
|
||||
|
|
|
@ -27,7 +27,9 @@ Core::Item::Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t mo
|
|||
auto itemInfo = g_exdData.getItemInfo( catalogId );
|
||||
m_delayMs = itemInfo->delayMs;
|
||||
m_physicalDmg = itemInfo->physical_damage;
|
||||
m_autoAttackDmg = float( m_physicalDmg * m_delayMs ) / 3000;
|
||||
m_magicalDmg = itemInfo->magical_damage;
|
||||
m_weaponDmg = ( m_physicalDmg != 0 ) ? m_physicalDmg : m_magicalDmg;
|
||||
m_autoAttackDmg = static_cast< float >( m_weaponDmg * m_delayMs ) / 3000;
|
||||
}
|
||||
|
||||
Core::Item::~Item()
|
||||
|
@ -50,6 +52,16 @@ uint16_t Core::Item::getPhysicalDmg() const
|
|||
return m_physicalDmg;
|
||||
}
|
||||
|
||||
uint16_t Core::Item::getMagicalDmg() const
|
||||
{
|
||||
return m_magicalDmg;
|
||||
}
|
||||
|
||||
uint16_t Core::Item::getWeaponDmg() const
|
||||
{
|
||||
return m_weaponDmg;
|
||||
}
|
||||
|
||||
uint32_t Core::Item::getId() const
|
||||
{
|
||||
return m_id;
|
||||
|
|
|
@ -44,6 +44,10 @@ public:
|
|||
|
||||
uint16_t getPhysicalDmg() const;
|
||||
|
||||
uint16_t getMagicalDmg() const;
|
||||
|
||||
uint16_t getWeaponDmg() const;
|
||||
|
||||
float getAutoAttackDmg() const;
|
||||
|
||||
|
||||
|
@ -64,6 +68,8 @@ protected:
|
|||
|
||||
uint16_t m_delayMs;
|
||||
uint16_t m_physicalDmg;
|
||||
uint16_t m_magicalDmg;
|
||||
uint16_t m_weaponDmg;
|
||||
float m_autoAttackDmg;
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue