added proc type 20 (physical attack damage attempt) and type 21 (magical attack damage attempt) -- these will serve as attempts to hit, not requiring a successful hit
This commit is contained in:
parent
2515b55e56
commit
2f558184b9
@ -279,6 +279,8 @@ void Entity::MeleeAttack(Spawn* victim, float distance, bool primary, bool multi
|
||||
CheckEncounterState((Entity*)victim);
|
||||
}
|
||||
|
||||
CheckProcs(PROC_TYPE_PHYSICAL_ATTEMPT, victim);
|
||||
|
||||
if(hit_result == DAMAGE_PACKET_RESULT_SUCCESSFUL){
|
||||
/*if(GetAdventureClass() == MONK){
|
||||
max_damage*=3;
|
||||
@ -359,6 +361,8 @@ bool Entity::RangeAttack(Spawn* victim, float distance, Item* weapon, Item* ammo
|
||||
if(!victim)
|
||||
return false;
|
||||
|
||||
CheckProcs(PROC_TYPE_PHYSICAL_ATTEMPT, victim);
|
||||
|
||||
bool item_deleted = false;
|
||||
if(weapon && weapon->IsRanged() && ammo && ammo->IsAmmo() && ammo->IsThrown()) {
|
||||
if(weapon->ranged_info->range_low <= distance && (weapon->ranged_info->range_high + ammo->thrown_info->range) >= distance) {
|
||||
@ -495,6 +499,9 @@ bool Entity::SpellAttack(Spawn* victim, float distance, LuaSpell* luaspell, int8
|
||||
if(victim->IsEntity()) {
|
||||
CheckEncounterState((Entity*)victim);
|
||||
}
|
||||
|
||||
CheckProcs(PROC_TYPE_MAGICAL_ATTEMPT, victim);
|
||||
|
||||
bool successful_hit = true;
|
||||
if(hit_result == DAMAGE_PACKET_RESULT_SUCCESSFUL) {
|
||||
luaspell->last_spellattack_hit = true;
|
||||
|
@ -1367,6 +1367,8 @@ struct Proc {
|
||||
#define PROC_TYPE_DAMAGED_MAGIC 17
|
||||
#define PROC_TYPE_RANGED_ATTACK 18
|
||||
#define PROC_TYPE_RANGED_DEFENSE 19
|
||||
#define PROC_TYPE_PHYSICAL_ATTEMPT 20
|
||||
#define PROC_TYPE_MAGICAL_ATTEMPT 21
|
||||
|
||||
struct ThreatTransfer {
|
||||
int32 Target;
|
||||
|
@ -6602,6 +6602,8 @@ int EQ2Emu_lua_AddWard(lua_State* state) {
|
||||
|
||||
if (wardType == WARD_TYPE_MAGICAL)
|
||||
ward->DamageType = damageTypes;
|
||||
else
|
||||
ward->DamageType = 0; // doesn't get used, but default set it anyway
|
||||
|
||||
ward->DeleteWard = false;
|
||||
// Add the ward to the entity
|
||||
|
Loading…
x
Reference in New Issue
Block a user