Jump to content

vincex

Members
  • Posts

    14
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by vincex

  1. From wowwiki history page we can found http://www.wowwiki.com/index.php?title=Stealth_(mechanic)&oldid=1697680 "When maxed, MoD is equivalent to 3 extra character levels" in 2.4.3 MoD is 5 point talent so 15 point total -> 5 point = 1 level diff. "Detection is an innate skill that all players and mobs have, and this increases by 5 points per level" so we base our calc on level diff. The only things that are missing (i wasnt able to found anything in internet): - Base start range. (i set it at 10 yard) - and the equation level per yard. (i set it at 1 level = 1 yard)
  2. This should fix stealth detection always visible in some case and use correct formula for stealth calculation. This can work for mangos in master tree too. diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 4604280..14366cb 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3290,6 +3290,8 @@ void Aura::HandleModStealth(bool apply, bool Real) if (apply) { + pTarget->RemoveAllAttackers(); + // drop flag at stealth in bg if(Real && pTarget->GetTypeId()==TYPEID_PLAYER && ((Player*)pTarget)->InBattleGround()) if(BattleGround *bg = ((Player*)pTarget)->GetBattleGround()) @@ -3376,6 +3378,7 @@ void Aura::HandleInvisibility(bool apply, bool Real) { if(apply) { + m_target->RemoveAllAttackers(); m_target->m_invisibilityMask |= (1 << m_modifier.m_miscvalue); if(Real && m_target->GetTypeId()==TYPEID_PLAYER) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 743fbf3..79ed8a4 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8833,22 +8833,28 @@ bool Unit::isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList, if(!u->HasAuraType(SPELL_AURA_DETECT_STEALTH)) { //Calculation if target is in front + //Base visible distance for every unit in stealth. + float visibleDistance = 10.0f; - //Visible distance based on stealth value (stealth rank 4 300MOD, 10.5 - 3 = 7.5) - float visibleDistance = 10.5f - (GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH)/100.0f); + //Stealth Level is calculated from stealth skill lvl 70 and stealtk rank 4 = 350 skill so 5 skill point = 1 level + float stealthLevel = (GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH)/5.0f); + float enemyLevel = float(u->getLevelForTarget(this)); - //Visible distance is modified by - //-Level Diff (every level diff = 1.0f in visible distance) - visibleDistance += int32(u->getLevelForTarget(this)) - int32(getLevelForTarget(u)); + //Skill for detection of the unit that is try to detect. + int32 enemyDetection = u->GetTotalAuraModifier(SPELL_AURA_MOD_DETECT); + if(enemyDetection<0) + enemyDetection = 0; - //This allows to check talent tree and will add addition stealth dependent on used points) - int32 stealthMod = GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH_LEVEL); + //Skill for mod stealth level of the unit in stealth. + int32 stealthMod = GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH_LEVEL); if(stealthMod < 0) stealthMod = 0; + + //Visible distance is mod by enemyDetection and stealth mod (5 skill point = 1 level ) + visibleDistance+= (enemyDetection-stealthMod)/5.0f; - //-Stealth Mod(positive like Master of Deception) and Stealth Detection(negative like paranoia) - //based on wowwiki every 5 mod we have 1 more level diff in calculation - visibleDistance += (int32(u->GetTotalAuraModifier(SPELL_AURA_MOD_DETECT)) - stealthMod)/5.0f; + //Visibile distance is mod by level diff + visibleDistance+= (enemyLevel - stealthLevel); if(!IsWithinDist(u,visibleDistance)) return false; }
  3. diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e6033a3..4782f3a 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -907,7 +907,7 @@ void Aura::_AddAura() for(Unit::AuraMap::const_iterator itr = m_target->GetAuras().lower_bound(spair); itr != m_target->GetAuras().upper_bound(spair); ++itr) { // allow use single slot only by auras from same caster - if(itr->second->GetCasterGUID()==GetCasterGUID()) + if(itr->second->GetCasterGUID()==GetCasterGUID() && itr->second->GetCastItemGUID()==GetCastItemGUID()) { slot = itr->second->GetAuraSlot(); secondaura = true; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e1a46f1..f5d01c2 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3433,7 +3433,7 @@ bool Unit::AddAura(Aura *Aur) { for(AuraMap::iterator i2 = m_Auras.lower_bound(spair); i2 != m_Auras.upper_bound(spair); ++i2) { - if(i2->second->GetCasterGUID()==Aur->GetCasterGUID()) + if(i2->second->GetCasterGUID()==Aur->GetCasterGUID() && i2->second->GetCastItemGUID()==Aur->GetCastItemGUID()) { // Aura can stack on self -> Stack it; if(aurSpellInfo->StackAmount) @@ -3446,8 +3446,26 @@ bool Unit::AddAura(Aura *Aur) RemoveAura(i2,AURA_REMOVE_BY_STACK); break; } - + + bool bSkipAurName = false; + //Special cases based on spellId + switch(aurSpellInfo->Id) + { + //Mongoose + case 28093: + bSkipAurName = true; + break; + + //more cases here + //case id: + // break; + //default: + // break; + } + bool stop = false; + //dont break iterator we must search enchant proc from main hand and off hand...just skip this aura + if(!bSkipAurName) switch(aurName) { // DoT/HoT/etc i dont have 3.x client so i can't test this but a similar patch for 2.4.3(with proc flags) works fine
  4. what about add this in SpellAuras.cpp void Aura::_AddAura() allow use single slot only by auras from same caster if(itr->second->GetCasterGUID()==GetCasterGUID() && itr->second->GetCastItemGUID()==GetCastItemGUID()) and in Unit.cpp Unit::AddAura(Aura *Aur) if(i2->second->GetCasterGUID()==Aur->GetCasterGUID() && i2->second->GetCastItemGUID()==Aur->GetCastItemGUID()) { // can be only single (this check done at _each_ aura add RemoveAura(i2,AURA_REMOVE_BY_STACK); break; } bool stop = false; switch(aurSpellInfo->EffectApplyAuraName[Aur->GetEffIndex()]) { //ADD HERE SINGLE CASE FOR EVERY ENCHANT TYPE this could fix buff for proc from different weapons... but can this cause any trouble with other stack rules?
  5. Core: 7624 mangos-0.12 SD2: 896 patched for 0.12 UDB: 365 Patch: Various patch full list at: http://github.com/vincex/mangos/commits/ld-0.12 http://pastebin.com/d4a2bd78 http://pastebin.com/m1c1b1562 Can be related to a corruption in map and vmap files?
  6. teleport will work only on open zone and you will ignore every GO.
  7. this should work better... this need vmap on too. I cant test it beacuse i dont have vmaps on my pc u.u. void Spell::EffectMomentMove(uint32 i) { if(unitTarget->isInFlight()) return; if( m_spellInfo->rangeIndex== 1) //self range { uint32 mapid = m_caster->GetMapId(); float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); // Start Info // float cx,cy,cz; float dx,dy,dz; float angle = unitTarget->GetOrientation(); unitTarget->GetPosition(cx,cy,cz); const int itr = int(dis/0.5f); const float _dx = 0.5f * cos(angle); const float _dy = 0.5f * sin(angle); dx = cx; dy = cy; //Going foward 0.5f until max distance for(float i=0.5f; i<dis; i+=0.5f) { dx += _dx; dy += _dy; MaNGOS::NormalizeMapCoord(dx); MaNGOS::NormalizeMapCoord(dy); dz = MapManager::Instance().GetMap(mapid, unitTarget)->GetHeight(dx, dy, cz); //Prevent climbing and go around object maybe 2.0f is to small? use 3.0f? if( (dz-cz) < 2.0f && (dz-cz) > -2.0f && (unitTarget->IsWithinLOS(dx, dy, dz))) { //No climb, the z differenze between this and prev step is ok. Store this destination for future use or check. cx = dx; cy = dy; cz = dz; } else { break; } } //Prevent Falling during swap building/outerspace unitTarget->UpdateGroundPositionZ(cx, cy, cz); if(unitTarget->GetTypeId() == TYPEID_PLAYER) ((Player*)unitTarget)->TeleportTo(mapid, cx, cy, cz, unitTarget->GetOrientation(), TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0)); else MapManager::Instance().GetMap(mapid, unitTarget)->CreatureRelocation((Creature*)unitTarget, cx, cy, cz, unitTarget->GetOrientation()); } }
  8. that is a mod of an old version of my patch. and in this version there's a problem as you said in the connection between gameobject and maps where GO intersect map. In this zone blink will teleport you on the maps and not on the GO. (try this in the way that lead you to the lake of stormwind in the interesecition between the bridge and the ground). But now with the new map calculation i dont know if the problem still exist.
  9. What bug does the patch fix? What features does the patch add? little fix in switch case of primitive path-finding for fear movement generator. For which SubVersion revision was the patch created? 6148 Who has been writing this patch? Please include either forum user names or email addresses. me Index: src/game/FleeingMovementGenerator.cpp =================================================================== --- src/game/FleeingMovementGenerator.cpp (revision 6148) +++ src/game/FleeingMovementGenerator.cpp (working copy) @@ -130,7 +130,7 @@ distance /= 2; break; case 10: - angle = cur_angle + M_PI/2.0f; + angle = cur_angle - M_PI/2.0f; distance /= 2; break; case 11:
  10. one kill= 20.9 honor at level 70. is just for say how much honor a player will gain because bonus honor must change based on player level... and isnt related to score board.
  11. this should work for update honorable kills at player kill in a better way Index: src/game/BattleGround.cpp =================================================================== --- src/game/BattleGround.cpp (revision 5990) +++ src/game/BattleGround.cpp (working copy) @@ -1048,8 +1048,21 @@ // add +1 kills and killing_blows if(killer) { - UpdatePlayerScore(killer, SCORE_HONORABLE_KILLS, 1); bg->UpdatePlayerScore(killer, SCORE_KILLING_BLOWS, 1); + + for(std::map<uint64, BattleGroundPlayer>::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) + { + Player *plr = objmgr.GetPlayer(itr->first); + + if(!plr) + { + sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first); + continue; + } + + if(plr->GetTeam() == killer->GetTeam() && plr->IsAtGroupRewardDistance(player)) + UpdatePlayerScore(plr, SCORE_HONORABLE_KILLS, 1); + } } // to be able to remove insignia
  12. from my exp in offy im sure about that... caputre flag should not give killing blows...
  13. Little fix at battleground score... KILLING_BLOWS is only for killing a player... not for captured flag in wsg... HONORABLE_KILLS is only for honor kills in group... not for captured flag in AB and in all BG if you give the last hit to a player you will be awarded of one KILLING_BLOWS Index: src/game/BattleGroundAB.cpp =================================================================== --- src/game/BattleGroundAB.cpp (revision 5691) +++ src/game/BattleGroundAB.cpp (working copy) @@ -599,7 +599,6 @@ sprintf(buf, GetMangosString(LANG_BG_AB_NODE_ASSAULTED), _GetNodeName(node)); (teamIndex == 0) ? SOUND_NODE_ASSAULTED_ALLIANCE : SOUND_NODE_ASSAULTED_HORDE; } - UpdatePlayerScore(source, SCORE_HONORABLE_KILLS, 1); UpdatePlayerScore(source, SCORE_BASES_ASSAULTED, 1); WorldPacket data; ChatHandler::FillMessageData(&data, source->GetSession(), type, LANG_UNIVERSAL, NULL, source->GetGUID(), buf, NULL); Index: src/game/BattleGroundWS.cpp =================================================================== --- src/game/BattleGroundWS.cpp (revision 5691) +++ src/game/BattleGroundWS.cpp (working copy) @@ -237,7 +237,6 @@ UpdateFlagState(Source->GetTeam(), 1); // flag state none UpdateTeamScore(Source->GetTeam()); - UpdatePlayerScore(Source, SCORE_KILLING_BLOWS, 3); // +3 kills for flag capture... UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1); // +1 flag captures... if(GetTeamScore(ALLIANCE) == BG_WS_MAX_TEAM_SCORE) Index: src/game/Unit.cpp =================================================================== --- src/game/Unit.cpp (revision 5691) +++ src/game/Unit.cpp (working copy) @@ -593,7 +593,7 @@ bg->UpdatePlayerScore(killed, SCORE_DEATHS, 1); if(killer) // add +1 kills - bg->UpdatePlayerScore(killer, SCORE_HONORABLE_KILLS, 1); + bg->UpdatePlayerScore(killer, SCORE_KILLING_BLOWS, 1); // to be able to remove insignia killed->SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE ); } dont know if this is correct too but here a patch for add honorable kills in BG... Index: src/game/Player.cpp =================================================================== --- src/game/Player.cpp (revision 5691) +++ src/game/Player.cpp (working copy) @@ -5468,6 +5468,14 @@ m_lastKillDate = now; m_saveKills = true; + + if( ((Player*)pVictim)->InBattleGround() ) + { + if(BattleGround *bg = GetBattleGround()) + { + bg->UpdatePlayerScore(this, SCORE_HONORABLE_KILLS, 1); + } + } } else {
  14. *What bug does the patch fix? What features does the patch add? Enable bonus spell reduction for AOE that affect only targets in front of the caster * For which SubVersion revision was the patch created? 5577 * Who has been writing this patch? Please include either forum user names or email addresses. Vincex Index: src/game/SpellMgr.h =================================================================== --- src/game/SpellMgr.h (revision 5577) +++ src/game/SpellMgr.h (working copy) @@ -283,6 +283,7 @@ { switch (target ) { + case TARGET_IN_FRONT_OF_CASTER: case TARGET_AREAEFFECT_CUSTOM: case TARGET_ALL_ENEMY_IN_AREA: case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
×
×
  • 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