Jump to content

blink patch 2009


Recommended Posts

  • Replies 97
  • Created
  • Last Reply

Top Posters In This Topic

For SilverIce patch. Found this problem, when inside Stormwind Castle, where you get the BG queue, go on top of the carpet in the middle and do blink, it will teleport you to the same position. You won't move but the effects will be done.

Link to comment
Share on other sites

Silverice giving some console errors

error: patch failed: src/game/Spell.cpp:4388
error: src/game/Spell.cpp: patch does not apply
error: patch failed: src/game/SpellEffects.cpp:5747
error: src/game/SpellEffects.cpp: patch does not apply

So am guessing is not compatible anymore.

EDIT: None of the Blink patches is compatible now. Am gonna test if this is needed anymore or not.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
Silverice giving some console errors

error: patch failed: src/game/Spell.cpp:4388
error: src/game/Spell.cpp: patch does not apply
error: patch failed: src/game/SpellEffects.cpp:5747
error: src/game/SpellEffects.cpp: patch does not apply

So am guessing is not compatible anymore.

EDIT: None of the Blink patches is compatible now. Am gonna test if this is needed anymore or not.

try different command like

patch -p1 > patch_path.patch

should work.

my question: I like lot the silverice patch for the way it work, how the situation is at the moment with rev 1/3 and pthers patches?

Link to comment
Share on other sites

  • 3 weeks later...
I've been searching for a patch to fix blink for some time, and I found one in KAPATEJIb's cumulative patches. I've got to say that patch is really good.

Blink never fails, always removes stun, will never teleport you under the map, and in 99% teleports forward. Why 99%? Because it doesn't work in tunnels, such as Stormwind tunnels that connect districts. My guess is in that zone maps or vmaps are not generated correct, because at the orgrimmar entrace(tunnel), blink works normally. In other zones, works perfect, including arenas and BGs. Doesn't teleport through objects, brings you up to them. Works only if there are vmaps on.

Here are the changes:

Spell.cpp

            case SPELL_EFFECT_LEAP:
            case SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER:
            {
-                float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
-                float fx = m_caster->GetPositionX() + dis * cos(m_caster->GetOrientation());
-                float fy = m_caster->GetPositionY() + dis * sin(m_caster->GetOrientation());
-                // teleport a bit above terrain level to avoid falling below it
-                float fz = MapManager::Instance().GetBaseMap(m_caster->GetMapId())->GetHeight(fx,fy,m_caster->GetPositionZ(),true);
-                if(fz <= INVALID_HEIGHT)                    // note: this also will prevent use effect in instances without vmaps height enabled
-                    return SPELL_FAILED_TRY_AGAIN;
-
-                float caster_pos_z = m_caster->GetPositionZ();
-                // Control the caster to not climb or drop when +-fz > 8
-                if(!(fz<=caster_pos_z+8 && fz>=caster_pos_z-8))
-                    return SPELL_FAILED_TRY_AGAIN;
-
                // not allow use this effect at battleground until battleground start
                if(m_caster->GetTypeId()==TYPEID_PLAYER)
                    if(BattleGround const *bg = ((Player*)m_caster)->GetBattleGround())

SpellEffects.cpp

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);

           //Check use of vamps//
           bool useVmap = false;
           bool swapZone = true;
           if( MapManager::Instance().GetMap(mapid, unitTarget)->GetHeight(cx, cy, cz, false) <  MapManager::Instance().GetMap(mapid, unitTarget)->GetHeight(cx, cy, cz, true) )
               useVmap = true;

           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)
           {
               //unitTarget->GetNearPoint2D(dx,dy,i,angle);
               dx += _dx;
               dy += _dy;
               MaNGOS::NormalizeMapCoord(dx);
               MaNGOS::NormalizeMapCoord(dy);
               dz = MapManager::Instance().GetMap(mapid, unitTarget)->GetHeight(dx, dy, cz, useVmap);

               //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
               {
                   //Something wrong with los or z differenze... maybe we are going from outer world inside a building or viceversa
                   if(swapZone)
                   {
                       //so... change use of vamp and go back 1 step backward and recheck again.
                       swapZone = false;
                       useVmap = !useVmap;
                       //i-=0.5f;
                       --i;
                       dx -= _dx;
                       dy -= _dy;
                   }
                   else
                   {
                       //bad recheck result... so break this and use last good coord for teleport player...
                       dz += 0.5f;
                       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());
   }
}

In SpellEffects.cpp, the MomentMove function is completely replaced by this one. This function is a modified version of KAPATEJIb's patch, dx, dy coords are computed in other way.

I tested this patch only for 2.4.3. For 3.0.x I'm not sure if it will work. However it should.

P.S. I hope it will help finish your work, Tassader2.

Out of all the Blink patches I've tested, this is BY FAR the most real working one. Why is it not been submitted for review?

Link to comment
Share on other sites

  • 2 weeks later...

Well for one, it won't compile for me. The build always fails. Even if I try to make a patch file out of it and patch it.

Thought at first it was what I was doin, but had a buddy of mine who does this stuff daily do it, still no dice.

I'd say it should be reviewed though since looking over what I do understand from it, looks good.

Link to comment
Share on other sites

  • 4 weeks later...

Any news for this patch??

The patch "Arclite" can't be compiled...

Some errors :

2>..\\..\\src\\game\\SpellEffects.cpp(6038) : error C2039: 'GetMap' : is not a member of 'MapManager'
2>        d:\\!source mangos\\!source mangos\\3.1.3_final_wo_dual\\src\\game\\MapManager.h(31) : see declaration of 'MapManager'
2>..\\..\\src\\game\\SpellEffects.cpp(6038) : error C2227: left of '->GetHeight' must point to class/struct/union/generic type
2>..\\..\\src\\game\\SpellEffects.cpp(6038) : error C2039: 'GetMap' : is not a member of 'MapManager'
2>        d:\\!source mangos\\!source mangos\\3.1.3_final_wo_dual\\src\\game\\MapManager.h(31) : see declaration of 'MapManager'
2>..\\..\\src\\game\\SpellEffects.cpp(6038) : error C2227: left of '->GetHeight' must point to class/struct/union/generic type
2>..\\..\\src\\game\\SpellEffects.cpp(6055) : error C2039: 'GetMap' : is not a member of 'MapManager'
2>        d:\\!source mangos\\!source mangos\\3.1.3_final_wo_dual\\src\\game\\MapManager.h(31) : see declaration of 'MapManager'
2>..\\..\\src\\game\\SpellEffects.cpp(6055) : error C2227: left of '->GetHeight' must point to class/struct/union/generic type
2>..\\..\\src\\game\\SpellEffects.cpp(6093) : error C2039: 'GetMap' : is not a member of 'MapManager'
2>        d:\\!source mangos\\!source mangos\\3.1.3_final_wo_dual\\src\\game\\MapManager.h(31) : see declaration of 'MapManager'
2>..\\..\\src\\game\\SpellEffects.cpp(6093) : error C2227: left of '->CreatureRelocation' must point to class/struct/union/generic type
2>Build log was saved at "file://d:\\_Source_Mangos\\_Source_Mangos\\3.1.3_final_wo_dual_Copy\\win\\VC90\\game__Win32_Release\\BuildLog.htm"
2>game - 8 error(s), 0 warning(s)

i've tried to find something on getmangos.ru but with no success...

My mages and rogues aways falls from the map =x

thx in advance

Link to comment
Share on other sites

  • 2 weeks later...

Yeah patch doesn't work on Wrath anymore sadly. :/

Works on 2.4.3 still just fine, you just got to change "void Spell::EffectMomentMove(uint32 i)" to "void Spell::EffectLeapForward(uint32 i)" since they renamed it.

I am a little surprised no "real" Blink patch has ever been written. I mean arena, AV and all that have big patches, but none for Blink? :( Dang :/.

Link to comment
Share on other sites

I hope he is. A definitive fix for Blink is long overdue. He's still pushing commits to his blink3 branch, so I'm assuming work still continues. Hopefully, all these other patches that have been posted here will give him some good ideas but my thought is that the quality of how Blink works is very dependent on the quality of how Vmaps function. A lot of actions depend on good terrain data and Vmaps work well, but it would be even better if a grid mesh could be used instead. Path-finding, terrain height, line-of-sight, and many other things could be handled more economically and with greater flexibility using simple polygons. No more need for waypoints or Vmaps! Unfortunately, I have no idea if all that is strictly server-side or if some of it is also dependent upon the client. If it's client-based then we're probably stuck with waypoints and Vmaps and just have to make the best of it.

Link to comment
Share on other sites

  • 2 weeks later...

Not necessarily.

  • * Sometimes a developer loses interest and abandons a project.
    * The project code can reach a point where some bugs cannot be fixed without starting over.
    * Real life events leaves little to no time for the developer to work on his project.
    * The project is dropped by the developer because he's found a better way to implement his idea and starts a new project.
    * The project is abandoned because someone else has created a better solution.
    * The project has achieved its goals and the code works flawlessly. No further development, aside from compatibility updates, is felt to be needed by the developer.

The point is, until Tassader says otherwise, any of those reasons listed could apply. Try to be patient. People work on these things in their spare time, without payment, as a labor of love or an interesting mental exercise. That being understood, only time will tell if Tassader is continuing to work on Blink 2009 or reveal the need for someone else to take up the idea.

Link to comment
Share on other sites

GM Fly mode works wonders for me. I'm always poking my character's nose into unfinished or forgotten corners of the realm, which means there are plenty of spots to fall through the ground. Being able to fly allows me halt my fall and find some solid ground to safely stand upon. Assuming you do have at least GM Level 2 access, you should set ".gm fly on" as a macro in the client so you can quickly execute the command in the event you do find yourself plummeting to oblivion.

Do you have Vmaps enabled for your world, just in battlegrounds/arenas/instances, or not at all? Without VMaps, none of the Blink patches work very well.

If you do have VMaps enabled for your entire realm, then it may have something to do with how Blink3 gets the VMap data in calculating the right coordinates for where a Mage will appear once he's cast Blink. It sounds like your mage is simply traveling in a straight line as he Blinks forward, even if this would put you below ground level or through the side of a hill. Look to see if the program code properly accounts for the Z-axis ( Height ) data provided by VMaps.

Try comparing some of the older, working Blink patches to Tassader's Blink3. Perhaps it might show where the flaw lies in the code and it could be fixed. It might be as simple as incorrect syntax or a more fundamental flaw in the overall flow of the code's logic.

Tassader, if you're reading this, I hope you will be the one to finally give us the best and most comprehensive fix for Blink. It's been long overdue.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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