Fix rogue's evade to be single target

This is also a lot nice performance wise
This commit is contained in:
Michael Cook (mackal)
2014-03-05 01:34:17 -05:00
parent 05df6c5b21
commit d70c4d7bbe
5 changed files with 28 additions and 8 deletions
+6
View File
@@ -99,6 +99,12 @@
#define TRADESKILL_FAILED 336 //You lacked the skills to fashion the items together.
#define TRADESKILL_TRIVIAL 338 //You can no longer advance your skill from making this item.
#define TRADESKILL_SUCCEED 339 //You have fashioned the items together to create something new!
#define EVADE_SUCCESS 343 //You have momentarily ducked away from the main combat.
#define EVADE_FAIL 344 //Your attempts at ducking clear of combat fail.
#define HIDE_FAIL 345 //You failed to hide yourself.
#define HIDE_SUCCESS 346 //You have hidden yourself from view.
#define SNEAK_SUCCESS 347 //You are as quiet as a cat stalking its prey.
#define SNEAK_FAIL 348 //You are as quiet as a herd of running elephants.
#define MEND_CRITICAL 349 //You magically mend your wounds and heal considerable damage.
#define MEND_SUCCESS 350 //You mend your wounds and heal some damage.
#define MEND_WORSEN 351 //You have worsened your wounds!
+8
View File
@@ -1447,3 +1447,11 @@ bool Mob::PassCharismaCheck(Mob* caster, Mob* spellTarget, uint16 spell_id) {
return false;
}
void Mob::RogueEvade(Mob *other)
{
int amount = other->GetHateAmount(this) - (GetLevel() * 13);
other->SetHate(this, std::max(1, amount));
return;
}
+10 -8
View File
@@ -3478,21 +3478,23 @@ void Client::Handle_OP_Hide(const EQApplicationPacket *app)
}
if(GetClass() == ROGUE){
EQApplicationPacket *outapp = new EQApplicationPacket(OP_SimpleMessage,sizeof(SimpleMessage_Struct));
SimpleMessage_Struct *msg=(SimpleMessage_Struct *)outapp->pBuffer;
msg->color=0x010E;
if (!auto_attack && entity_list.Fighting(this)) {
SimpleMessage_Struct *msg = (SimpleMessage_Struct *)outapp->pBuffer;
msg->color = 0x010E;
Mob *evadetar = GetTarget();
if (!auto_attack && (evadetar && evadetar->CheckAggro(this)
&& evadetar->IsNPC())) {
if (MakeRandomInt(0, 260) < (int)GetSkill(SkillHide)) {
msg->string_id=343;
entity_list.Evade(this);
msg->string_id = EVADE_SUCCESS;
RogueEvade(evadetar);
} else {
msg->string_id=344;
msg->string_id = EVADE_FAIL;
}
} else {
if (hidden){
msg->string_id=346;
msg->string_id = HIDE_SUCCESS;
}
else {
msg->string_id=345;
msg->string_id = HIDE_FAIL;
}
}
FastQueuePacket(&outapp);
+1
View File
@@ -146,6 +146,7 @@ public:
virtual int32 GetMeleeMitDmg(Mob *attacker, int32 damage, int32 minhit, float mit_rating, float atk_rating);
bool CombatRange(Mob* other);
virtual inline bool IsBerserk() { return false; } // only clients
void RogueEvade(Mob *other);
//Appearance
void SendLevelAppearance();