Jump to content

[Working]OutdoorPvP r10049+


Recommended Posts

oki, I try to update code to the latest revision but its not possible whithout add more hack, some function in objet accessor were removed and use map function now, so I begin start convert OutdoorPvp to ScriptDev2, I thinks its the best choice for the last mangos revision, its now support this so why wait more time ? :D

Link to comment
Share on other sites

  • Replies 156
  • Created
  • Last Reply

Top Posters In This Topic

Implementing the Outdoor PvP events in SD2 is pretty simple if we could separate the world map into zones and subzones (ex: Outland -> Nargrand -> Halaa) and implement a specific map script for each zone.

This might be also useful in implementing Wintergrasp battlefield or some complex quests - ex: The Light of Dawn; because these events need instance-like scripts.

Link to comment
Share on other sites

I did some digging through the MaNGOS core. It appears this recent patch for MaNGOS One has been in the MaNGOS master for quite some time. That's what happens when you're so busy tinkering with your own code that you neglect keeping apprised of core changes that can affect your work. :o

Implementing the Outdoor PvP events in SD2 is pretty simple if we could separate the world map into zones and subzones (ex: Outland -> Nargrand -> Halaa) and implement a specific map script for each zone.

Look closely at the SQL tables for 'characters_world' and 'mangos_world_template'. Those are enough to indicate the core does indeed allow for calling scripts on a per-map basis for both instanced and non-instanced maps.

Link to comment
Share on other sites

I'll second that, darkstalker. ;)

I think lecails has been hard at work with a template script. Keep up the good work, lecails! :)

Unfortunately, this means that 90% of the work has now been moved into SD2 which means that Outdoor PvP mostly lies outside the scope of these forums. I suppose we should see new threads in the ScriptDev2 forums for further developments.

Looks like my own work on Outdoor PvP is now redundant and I have not yet learned SD2 scripting. I'm still busy learning C++, so I'll keep working on my OPvP strictly for educational purposes.

I don't know if any of the core devs read this thread, but thank you for the code committed to both MaNGOS master and One that makes Outdoor PvP more easily and correctly implemented ( even if you did cause any core work done here to be flushed down the tubes. lol ).

With Outdoor PvP being a community project, I would encourage everyone interested in learning scripting, or those already possessing the skills, to pick a zone and start coding those Outdoor PvP scripts!

Link to comment
Share on other sites

  • 2 weeks later...

Well I think that my recent enthusiasm in scripting all the outdoor pvp events has come to an end. :(

When I first started with Silithus event, http://www.wowwiki.com/The_Silithyst_Must_Flow, things were pretty simple. Player picks the flag, recieves a debuff, drops the flag if hit by another player of the opposite faction and finally deliver the flag to the area trigger and then receives a reward buff + some honor and reputation.

This was the easiest script.

Today I started to research and write the eastern plaguelands event, http://www.wowwiki.com/A_Game_of_Towers, but I found out that we are missing some critical core feature: GAMEOBJECT_TYPE_CAPTURE_POINT (type 29).

Here are some more details:

This object is related to all the points which need to be captured by pvp (you know about the slider which moves towards the faction which has the most players near the tower).

So the main ideea is that most of the tower like pvp events after 1.12.1 were implemented using this type of game object (even in wintergrasp and eye of storm).

Here is the list of them:

181899    Doodad_BattlefieldBanner_State_Base_Plaguelands01
182096    Doodad_BattlefieldBanner_State_Base_Plaguelands02
182097    Doodad_BattlefieldBanner_State_Base_Plaguelands03
182098    Doodad_BattlefieldBanner_State_Base_Plaguelands04
182173    Hellfire Banner, W
182174    Hellfire Banner, N
182175    Hellfire Banner, S
182210    Halaa Banner
182522    Zangarmarsh Banner
182523    Zangarmarsh Banner
183104    Terokkar Banner
183411    Terokkar Banner
183412    Terokkar Banner
183413    Terokkar Banner
183414    Terokkar Banner
184080    BE Tower Cap Pt
184081    Fel Reaver Cap Pt
184082    Human Tower Cap Pt
184083    Draenei Tower Cap Pt
184380    Visual Banner (Horde)
184381    Visual Banner (Alliance)
184382    Visual Banner (Neutral)
189310    Venture Bay Lighthouse
190475    Wintergrasp NE Factory Banner
190487    Wintergrasp NW Factory Banner
192626    Wintergrasp NE Factory Banner
192627    Wintergrasp NW Factory Banner
194959    Wintergrasp SE Factory Banner
194960    Wintergrasp SE Factory Banner
194962    Wintergrasp SW Factory Banner
194963    Wintergrasp SW Factory Banner

In eye of storm there is already some working script, but I believe that it's some kind of hacky because it checks the distance between the player and the GO on e timer update event then it updates the player states. This is done exactly like the old outdoor pvp patch.

So what I'm trying to say is that all these capture points should be based on the implementation of this type of GO and should use the event ids provided in the DB;

Unfortunately, since this type of GO is not implemented in core we can't make any progress with the script. :(

PS.

I gathered some research about this type of GO. Maybe somebody will give some helping hand on implementing them.

http://paste2.org/p/1302865

Basically we have to implement the processing of all the event types (win, progress, conquest, neutral) in core then send them to SD2 for further scripting.

Link to comment
Share on other sites

After another research session I came up with this patch:

http://paste2.org/p/1305022

This implements the basics of GO_TYPE_29 -> capture points.

Summary:

* This implements a grid search function which searches for the players in range of the game object as defined in the DB. Then it stores the guid of each new player in a set. After this it iterates the set and checks for use conditions. If the player is no longer in range, then it removes it from the set.

* In the use() function it send the player the world state packets as defined in DB. Then, depending on the slider tick counter and on the capture states which I defined, it sends the script events, which will be further handled in SD2.

* How does the slider work: This is a percent bar: 0 = horde side, 100 = alliance side and 50 = middle neutral. The slider starts at 50 and based on the tick counter and the neutral percent defined in DB I can calculate whenever the slider passes to one side or the other.

* ToDo: the slider movement calculations is not implemented properly yet. This should also involve the min and max superiority and min and max time values.

I also tested on a dummy event in SD2 and everything works fine. Hopefully after I'll finish the eastern plaguelands script in SD2 someone will help me test this better.

PS. Thanks Schmoozerd for helping me with this. :D

PPS. If I've done some coding mistakes, please point them out.

Link to comment
Share on other sites

It is, more or less.

Some things are still not supported in the core, such as the GameObjects issue encountered by Xfurry. How those missing features are implemented can affect whether the code is labeled as "proper", but let's hope using coding hacks or workarounds are avoided as much as possible so OutdoorPvP will make it into the core.

That's why we need everyone to help. The more brains working on this, the better the code will be. Feel free to dig in and get your hands dirty! :)

Link to comment
Share on other sites

  • 2 weeks later...

I try to implement several pieces and I am lost, I do not know if I have a latest vverion of a module, do you plan Xfurry to do a full package ?,a succession of modules , a succession of underv review scripts (core + a module for each outdoor ) ?

what I have found

I am using git://github.com/xfurry/Mangos.git => for main core, git://github.com/xfurry/scriptdev2.git for scriptdev2

I do not manage to see implementation for Vc 100, only vc80 & vc90

I still have this kind of error:

1>ScriptLoader.obj : error LNK2019: unresolved external symbol "void __cdecl AddSC_outdoor_pvp_eastern_plaguelands(void)" (?AddSC_outdoor_pvp_eastern_plaguelands@@YAXXZ) referenced in function "void __cdecl AddScripts(void)" (?AddScripts@@YAXXZ)
1>ScriptLoader.obj : error LNK2019: unresolved external symbol "void __cdecl AddSC_outdoor_pvp_silithus(void)" (?AddSC_outdoor_pvp_silithus@@YAXXZ) referenced in function "void __cdecl AddScripts(void)" (?AddScripts@@YAXXZ)

when compiling scriptdev2 with xfurry code

any ideas please ?

Link to comment
Share on other sites

  • 2 weeks later...
Is there an updated patch for this?

Sorry, I didn't have time to work on this, because I'm busy with my master degree.

I'll try to update the patch in the weeks to come and I already have some ideas on how to improve this, but I don't know yet when I'll have time for it.

If somebody wants to continue my idea, feel free to take my code and improve it in whatever way you think it's better.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 5 weeks later...

Well unfortunately it seems that people don't care too much about this feature even if it's straight related to Wintergrasp and other world pvp areas in 4.x.x

Hopefully if nobody cares about developing this functionality, at least maybe someone will care about testing it.

Since my idea of moving the world pvp areas scripts to SD2 wasn't exactly the best, I started to dig in the old world pvp patch, I stripped it of all hacky things, improve it and I combined it with my latest work from gameobjects capture point and SD2 implementation of world pvp. So after a few days of work here is the result: :P

http://paste2.org/p/1478845

This will make the world pvp areas of Silithus and Eastern Plaguelands work much better than the previous versions.

There are only two issues which I couldn't implement because I'm not very familiar with them:

* The graveyard link for a faction should be set dynamically depending on the tower controller;

* When there are a few players on the map and the grid unloads then the capture point's state resets to neutral even if inside the pvp event it's marked as captured by one of the factions. This issue can make serious problems, basically bugging the whole event system. Some help related to storing the towers state while the grid is unloaded would be appreciated. :)

* Gameobjects are not respawning on the map -> probably core bug or my mistake.

PS. Please ignore the gameobjects loot rules in the patch. I added them by mistake.

Link to comment
Share on other sites

  • 2 weeks later...

hi Xfurry.

I've tried your patch for world pvp, I see incomplete things in Eastern Plaguelands. Ej: I can captured the tower but the count isn't work.

I think which the pvp outdoor should been work for more people because it is need for working Wintergrasp in mangos

regards

Link to comment
Share on other sites

  • 2 weeks later...

Hello, your work is excellent but I can not compile after patch with http://paste2.org/p/1478845

I do not understand why! I use ahbot and playerbot.

[== Console ==]
[ 76%] Building CXX object src/game/CMakeFiles/game.dir/WorldPvP.cpp.o /home/mangos/mangos/src/game/WorldPvPMgr.h:45: erreur: ‘uint32’ has not been declared /home/mangos/mangos/src/game/WorldPvPMgr.h:48: erreur: ‘uint32’ has not been declared /home/mangos/mangos/src/game/WorldPvPMgr.h:51: erreur: ISO C++ forbids declaration of ‘WorldPvP’ with no type /home/mangos/mangos/src/game/WorldPvPMgr.h:51: erreur: expected ‘;’ before ‘*’ token /home/mangos/mangos/src/game/WorldPvPMgr.h:54: erreur: expected ‘;’ before ‘(’ token /home/mangos/mangos/src/game/WorldPvPMgr.h:57: erreur: ‘uint32’ has not been declared /home/mangos/mangos/src/game/WorldPvPMgr.h:57: erreur: ‘WorldPvP’ has not been declared /home/mangos/mangos/src/game/WorldPvPMgr.h:59: erreur: ‘uint32’ has not been declared /home/mangos/mangos/src/game/WorldPvPMgr.h:62: erreur: ‘uint32’ has not been declared /home/mangos/mangos/src/game/WorldPvPMgr.h:68: erreur: ‘std::set’ has not been declared /home/mangos/mangos/src/game/WorldPvPMgr.h:68: erreur: expected ‘,’ or ‘...’ before ‘<’ token /home/mangos/mangos/src/game/WorldPvPMgr.h:70: erreur: ISO C++ forbids declaration of ‘vector’ with no type /home/mangos/mangos/src/game/WorldPvPMgr.h:70: erreur: nom du typedef peut ne pas être un nom de spécificateur imbriqué /home/mangos/mangos/src/game/WorldPvPMgr.h:70: erreur: expected ‘;’ before ‘<’ token /home/mangos/mangos/src/game/WorldPvPMgr.h:71: erreur: ISO C++ forbids declaration of ‘map’ with no type /home/mangos/mangos/src/game/WorldPvPMgr.h:71: erreur: nom du typedef peut ne pas être un nom de spécificateur imbriqué /home/mangos/mangos/src/game/WorldPvPMgr.h:71: erreur: expected ‘;’ before ‘<’ token /home/mangos/mangos/src/game/WorldPvPMgr.h:75: erreur: ‘WorldPvPSet’ does not name a type /home/mangos/mangos/src/game/WorldPvPMgr.h:79: erreur: ‘WorldPvPMap’ does not name a type /home/mangos/mangos/src/game/WorldPvPMgr.h:82: erreur: ‘uint32’ does not name a type /home/mangos/mangos/src/game/WorldPvP.cpp: In member function ‘virtual void WorldPvP::HandlePlayerLeaveZone(Player*)’: /home/mangos/mangos/src/game/WorldPvP.cpp:39: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp:44: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp: In member function ‘void WorldPvP::SendUpdateWorldState(uint32, uint32)’: /home/mangos/mangos/src/game/WorldPvP.cpp:56: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp: In member function ‘virtual void WorldPvP::HandlePlayerKill(Player*, Unit*)’: /home/mangos/mangos/src/game/WorldPvP.cpp:68: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp:70: erreur: ‘GroupReference’ was not declared in this scope /home/mangos/mangos/src/game/WorldPvP.cpp:70: erreur: ‘itr’ was not declared in this scope /home/mangos/mangos/src/game/WorldPvP.cpp:70: erreur: invalid use of undefined type ‘struct Group’ /home/mangos/mangos/src/game/Object.h:69: erreur: forward declaration of ‘struct Group’ /home/mangos/mangos/src/game/WorldPvP.cpp:78: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp:83: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp:91: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp: In member function ‘void WorldPvP::RegisterZone(uint32)’: /home/mangos/mangos/src/game/WorldPvP.cpp:100: erreur: no matching function for call to ‘WorldPvPMgr::AddZone(uint32&, WorldPvP* const)’ /home/mangos/mangos/src/game/WorldPvPMgr.h:57: note: candidats sont: void WorldPvPMgr::AddZone(int, int*) /home/mangos/mangos/src/game/WorldPvP.cpp: In member function ‘void WorldPvP::DoProcessTeamBuff(Team, uint32, bool)’: /home/mangos/mangos/src/game/WorldPvP.cpp:117: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp:120: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp:123: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp:124: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp: In member function ‘Player* WorldPvP::GetPlayerInZone(bool, bool)’: /home/mangos/mangos/src/game/WorldPvP.cpp:135: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ /home/mangos/mangos/src/game/WorldPvP.cpp:135: erreur: invalid use of undefined type ‘struct Player’ /home/mangos/mangos/src/game/WorldPvPMgr.h:29: erreur: forward declaration of ‘struct Player’ make[2]: *** [src/game/CMakeFiles/game.dir/WorldPvP.cpp.o] Erreur 1 make[1]: *** [src/game/CMakeFiles/game.dir/all] Erreur 2 make: *** [all] Erreur 2

Link to comment
Share on other sites

  • 1 month later...
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