Jump to content

Roshnak

Members
  • Posts

    7
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

About Roshnak

  • Birthday 01/01/1

Roshnak's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. I don't have so much information about it so I use the same sistem of the personal
  2. yes is a good idea, but in this moment I don't change it becouse I see that in 11300 the code change so somebody can change it for his mangos version like https://github.com/bwsrv/mangos/commit/41644a051a444e4bc8f5652193532bb88a1e759f
  3. What bug does the patch fix? What features does the patch add? Arena join using matchmaker rating For which repository revision was the patch created? 11.100 Who has been writing this patch? Please include either forum user names or email addresses. me using some code off http://code.google.com/p/trinitycore/source/detail?spec=svnfce5b5c2182cc5c2c53e31d3b082cef11f5811ca&r=fce5b5c2182cc5c2c53e31d3b082cef11f5811ca and https://github.com/rsa/mangos/commit/65772551b3ade14a169b929f0bf1e7d73c524319 Arena teams are joining the battle using arena team rating or average members personal rating, if one player who have for example 2000 personal leave team and join to other or the same team its personal rating decrease to 0 and they join the battle with the average of the team if all have 0 entrer with 0 and it shouldn't happends. To solve this problem I tried to create new arena join sistem using other rating who players can't see, for this I create a new table in characters database who contains this rating and it isn't deleted when player leave team and is not reset when join otrher team too CREATE TABLE IF NOT EXISTS hidden_rating (guid INT(11) UNSIGNED NOT NULL, rating2 INT(10) UNSIGNED NOT NULL, rating3 INT(10) UNSIGNED NOT NULL,rating5 INT(10) UNSIGNED NOT NULL); http://pastebin.com/HKrQM7DK http://pastebin.com/j6gtXNyu http://pastebin.com/hLGdyX3E http://pastebin.com/U9kF8tDA Its my try to solve this if someone can improve it please post
  4. I made a mistake when I posted the code, wasn't complete. Now is fine
  5. oh its true i don't think about it, thank you edited
  6. What bug does the patch fix? it fix atacks from behind when hunters use deterrence For which repository revision was the patch created? I use the branch of kero99 https://github.com/kero99/Stable Who has been writing this patch? me diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index b4dc9f9..e9c8455 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2929,11 +2929,23 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack bool from_behind = !pVictim->HasInArc(M_PI_F,this); - if (from_behind) + if (from_behind) { + if(pVictim->HasAura(19263)) { + int32 tmp2 = int32(parry_chance); + if ( (tmp2 > 0) // check if unit _can_ parry + && ((tmp2 -= skillBonus) > 0) + && (roll < (sum += tmp2))) + { + DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum); + return MELEE_HIT_PARRY; + } + } + else DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: attack came from behind."); + } // Dodge chance - + // only players can't dodge if attacker is behind if (pVictim->GetTypeId() != TYPEID_PLAYER || !from_behind) { @@ -2976,7 +2988,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum); return MELEE_HIT_PARRY; } - } + } } // Max 40% chance to score a glancing blow against mobs that are higher level (can do only players and pets and not with ranged weapon) @@ -3284,6 +3296,12 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell) if (roll < tmp) return SPELL_MISS_DEFLECT; } + if(pVictim->HasAura(19263)) { + int32 deflect_chance = pVictim->GetTotalAuraModifier(SPELL_AURA_DEFLECT_SPELLS)*100; + tmp+=deflect_chance; + if (roll < tmp) + return SPELL_MISS_DEFLECT; + } return SPELL_MISS_NONE; } @@ -3294,8 +3312,10 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell) if (GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER) canDodge = false; // Can`t parry - canParry = false; + if(!pVictim->HasAura(19263)) + canParry = false; } + // Check creatures flags_extra for disable parry if(pVictim->GetTypeId()==TYPEID_UNIT) { @@ -3436,7 +3456,12 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell) if (rand < tmp) return SPELL_MISS_DEFLECT; } - + if(pVictim->HasAura(19263)) { + int32 deflect_chance = pVictim->GetTotalAuraModifier(SPELL_AURA_DEFLECT_SPELLS)*100; + tmp+=deflect_chance; + if (rand < tmp) + return SPELL_MISS_DEFLECT; + } return SPELL_MISS_NONE; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use