Jump to content

[not working] Outdoor Pvp


Recommended Posts

  • Replies 621
  • Created
  • Last Reply

Top Posters In This Topic

is it true that Vladimir doesn't want to implement this patch (the same for alterac valley ?) ?
no, that's wrong.

it's simply so, that neither the outdoor-pvp nor the alterac patch are ready to go into the repo. therefore they stay in here and are under further development.

and yes, the original authors have left mangos, so others have first to learn, what the code does exactly, else they can't maintain it later.

so if this code will be ready and a mangos dev (probably balrok?) has learned how to maintain this code (as it contains much changes to mangos), they'll completely review it and commit it.

Link to comment
Share on other sites

  • 4 weeks later...

Do you think it's the good way to fix conflicts with 3.2.2 ?

void Player::UpdateZone(uint32 newZone, uint32 newArea)
{
   AreaTableEntry const* zone = GetAreaEntryByAreaID(newZone);
   if(!zone)
       return;

   uint32 oldZoneId  = m_zoneUpdateId;

   if(m_zoneUpdateId != newZone)
   {
       SendInitWorldStates(newZone, newArea);              // only if really enters to new zone, not just area change, works strange...

       if (sWorld.getConfig(CONFIG_WEATHER))
       {
           if(Weather *wth = sWorld.FindWeather(zone->ID))
               wth->SendWeatherUpdateToPlayer(this);
           else if(!sWorld.AddWeather(zone->ID))
           {
               // send fine weather packet to remove old zone's weather
               Weather::SendFineWeatherUpdateToPlayer(this);
           }
       }
   }

   m_zoneUpdateId    = newZone;
   m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL;

   // zone changed, so area changed as well, update it
   UpdateArea(newArea);

   // inform outdoor pvp
   if(oldZoneId != m_zoneUpdateId)
   {
       sOutdoorPvPMgr.HandlePlayerLeaveZone(this, oldZoneId);
       sOutdoorPvPMgr.HandlePlayerEnterZone(this, m_zoneUpdateId);
   }    

   // in PvP, any not controlled zone (except zone->team == 6, default case)
   // in PvE, only opposition team capital
   switch(zone->team)
   {
[...]

Link to comment
Share on other sites

my solution was a bit different - i got rid of this oldZoneId variable

so everything got quite short:

 6251     if(m_zoneUpdateId != newZone)
6252     {
6253         // inform outdoor pvp
6254         sOutdoorPvPMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
6255         sOutdoorPvPMgr.HandlePlayerEnterZone(this, newZone);
6256 
6257         SendInitWorldStates(newZone, newArea);              // only if really enters to new zone, not just area change, works strange...
6258 
6259         if (sWorld.getConfig(CONFIG_WEATHER))
6260         {

i just did a quick test and hope it still works as expected (:

Link to comment
Share on other sites

Anybody got any ideea with what "SendUpdateObjectToAllExcept" was replaced with?

../../../src/game/OutdoorPvPEP.cpp: In member function 'virtual bool OutdoorPvPObjectiveEP_EWT::Update(uint32)':
../../../src/game/OutdoorPvPEP.cpp:109: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp:114: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp: In member function 'virtual bool OutdoorPvPObjectiveEP_NPT::Update(uint32)':
../../../src/game/OutdoorPvPEP.cpp:280: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp:285: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp: In member function 'virtual bool OutdoorPvPObjectiveEP_CGT::Update(uint32)':
../../../src/game/OutdoorPvPEP.cpp:445: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp:450: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp: In member function 'virtual bool OutdoorPvPObjectiveEP_PWT::Update(uint32)':
../../../src/game/OutdoorPvPEP.cpp:611: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp:616: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
make[3]: *** [OutdoorPvPEP.o] Error 1
make[3]: Leaving directory `/root/mangos/

http://github.com/mangos/mangos/commit/3209e0a7dfaf44d6db43c02f985a89a4b99c9437

Link to comment
Share on other sites

Anybody got any ideea with what "SendUpdateObjectToAllExcept" was replaced with?

../../../src/game/OutdoorPvPEP.cpp: In member function 'virtual bool OutdoorPvPObjectiveEP_EWT::Update(uint32)':
../../../src/game/OutdoorPvPEP.cpp:109: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp:114: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp: In member function 'virtual bool OutdoorPvPObjectiveEP_NPT::Update(uint32)':
../../../src/game/OutdoorPvPEP.cpp:280: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp:285: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp: In member function 'virtual bool OutdoorPvPObjectiveEP_CGT::Update(uint32)':
../../../src/game/OutdoorPvPEP.cpp:445: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp:450: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp: In member function 'virtual bool OutdoorPvPObjectiveEP_PWT::Update(uint32)':
../../../src/game/OutdoorPvPEP.cpp:611: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
../../../src/game/OutdoorPvPEP.cpp:616: error: 'class GameObject' has no member named 'SendUpdateObjectToAllExcept'
make[3]: *** [OutdoorPvPEP.o] Error 1
make[3]: Leaving directory `/root/mangos/

http://github.com/mangos/mangos/commit/3209e0a7dfaf44d6db43c02f985a89a4b99c9437

Bump up! i hope someone answers...

Link to comment
Share on other sites

[color="Red"]//[/color]SendUpdateObjectToAllExcept

so you can fix these errors

Index: src/game/OutdoorPvPEP.cpp
===================================================================
--- src/game/OutdoorPvPEP.cpp    (revision 1)
+++ src/game/OutdoorPvPEP.cpp    (working copy)
@@ -98,12 +98,12 @@
            if(flag)
            {
                flag->SetGoArtKit(artkit);
[color="Red"]-                flag->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag->SendUpdateObjectToAllExcept(NULL);[/color]
            }
            if(flag2)
            {
                flag2->SetGoArtKit(artkit);
[color="Red"]-                flag2->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag2->SendUpdateObjectToAllExcept(NULL);[/color]
            }


@@ -273,12 +273,12 @@
            if(flag)
            {
                flag->SetGoArtKit(artkit);
[color="Red"]-                flag->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag->SendUpdateObjectToAllExcept(NULL);[/color]
            }
            if(flag2)
            {
                flag2->SetGoArtKit(artkit);
[color="Red"]-                flag2->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag2->SendUpdateObjectToAllExcept(NULL);[/color]
            }

            UpdateTowerState();
@@ -442,12 +442,12 @@
            if(flag)
            {
                flag->SetGoArtKit(artkit);
[color="Red"]-                flag->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag->SendUpdateObjectToAllExcept(NULL);[/color]
            }
            if(flag2)
            {
                flag2->SetGoArtKit(artkit);
[color="Red"]-                flag2->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag2->SendUpdateObjectToAllExcept(NULL);[/color]
            }

            UpdateTowerState();
@@ -612,12 +612,12 @@
            if(flag)
            {
                flag->SetGoArtKit(artkit);
[color="Red"]-                flag->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag->SendUpdateObjectToAllExcept(NULL);[/color]
            }
            if(flag2)
            {
                flag2->SetGoArtKit(artkit);
[color="Red"]-                flag2->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag2->SendUpdateObjectToAllExcept(NULL);[/color]
            }

            UpdateTowerState();
Index: src/game/OutdoorPvPHP.cpp
===================================================================
--- src/game/OutdoorPvPHP.cpp    (revision 1)
+++ src/game/OutdoorPvPHP.cpp    (working copy)
@@ -251,12 +251,12 @@
            if(flag)
            {
                flag->SetGoArtKit(artkit);
[color="Red"]-                flag->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag->SendUpdateObjectToAllExcept(NULL);[/color]
            }
            if(flag2)
            {
                flag2->SetGoArtKit(artkit2);
[color="Red"]-                flag2->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag2->SendUpdateObjectToAllExcept(NULL);[/color]
            }

            // send world state update
Index: src/game/OutdoorPvPNA.cpp
===================================================================
--- src/game/OutdoorPvPNA.cpp    (revision 1)
+++ src/game/OutdoorPvPNA.cpp    (working copy)
@@ -645,7 +645,7 @@
            if(flag)
            {
                flag->SetGoArtKit(artkit);
[color="Red"]-                flag->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+                //flag->SendUpdateObjectToAllExcept(NULL);[/color]
            }

            UpdateHalaaWorldState();
Index: src/game/OutdoorPvPTF.cpp
===================================================================
--- src/game/OutdoorPvPTF.cpp    (revision 1)
+++ src/game/OutdoorPvPTF.cpp    (working copy)
@@ -344,7 +344,7 @@
            if(flag)
            {
                flag->SetGoArtKit(artkit);
[color="Red"]-                flag->SendUpdateObjectToAllExcept(NULL);[/color]
[color="Lime"]+               //flag->SendUpdateObjectToAllExcept(NULL);[/color]
            }

            UpdateTowerState();

Link to comment
Share on other sites

lol realy?

since i still didn't find out for what reason setgoartkit was added (as the name sounds - it can change the model of a gameobject maybe) it would help much to remove wrong / not needed code, which is surrounding this unknown thing.. ^^

so i apply your patch right now.. if other people say it changes things the bad way, they can post here :) - then we can use a better patch :)

edit: setgoartkit calls SetByteValue

and setbytevalue calls ObjectAccessor::Instance().AddUpdateObject(this);

which sounds good for me :))

realy nice solution then :)

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