Jump to content

Playerbot (archive)


Recommended Posts

I did not realize functions were case-sensitive in C++. I know they are in Java, but I thought the C++ compiler would interpret GetLeaderGUID to be the same as GetLeaderGuid.

Now I'm confused! :S

C/c++ is case sensitive but i think some standard functions aren't or are implemented in more than 1 way :)

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

Blueboy helpppp :D Try using patch on core 10385 i get error

http://www.crypthome.com/error.jpg

Hi,

I've just tried applying a patch created from the current code on portal to the current MaNGOS HEAD [10391], and it works without issue. I also tried it with MaNGOS[10385] and it worked too. Are you applying any other patches prior to playerbot (maybe auctionhousebot). The conflict might be caused by these. Try applying the playerbot patch first.

Hope this helps

Link to comment
Share on other sites

lol yap it was auction house... :D yours is working fine, Sorry about that

Yes I thought it might be. Both auctionhousebot & playerbot modify World.cpp more or less @ the same location. Chances are that the guys who support auctionhousebot will insist you apply their patch first. To prevent you from being in a support ('Piggy in the Middle'), I suggest you choose the order, and then stick to it. Then, if you get a conflict, you only need to fix the same patch each time.

This was one reason why I decided to host my own 'auctionhousebot' repo, to ensure that neither conflict.

Snippet from the auctionhousebot patch on my ahbot repo

diff --git a/src/game/World.cpp b/src/game/World.cpp
index f45f20c..b04bb80 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -61,6 +61,7 @@
#include "GMTicketMgr.h"
#include "Util.h"
#include "CharacterDatabaseCleaner.h"
+#include "AuctionHouseBot.h"

INSTANTIATE_SINGLETON_1( World );

@@ -1312,6 +1313,9 @@ void World::SetInitialWorldSettings()
    uint32 nextGameEvent = sGameEventMgr.Initialize();
    m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent);    //depend on next event

+    sLog.outString("Initialize AuctionHouseBot...");
+    auctionbot.Initialize();
+
    // Delete all characters which have been deleted X days before
    Player::DeleteOldCharacters();

@@ -1392,6 +1396,7 @@ void World::Update(uint32 diff)
    /// <ul>[*] Handle auctions when the timer has passed
    if (m_timers[WUPDATE_AUCTIONS].Passed())
    {
+        auctionbot.Update();
        m_timers[WUPDATE_AUCTIONS].Reset();

        ///- Update mails (return old mails with item, or delete them)

Compare the 3 line pattern above and below the patch mod, with the file (src/game/World.cpp). If there is any difference, cut the 3 line pattern from the patch & copy/paste the pattern from the file. Remember to include an additional space at the start of each line you paste, otherwise the patch won't work.

Hope this helps

Link to comment
Share on other sites

This conflict happens no matter when you apply ahbot and playerbot or what order, I have tried both ways and get the same error and it's all because of:

sLog.outString("Initialize AuctionHouseBot...");

auctionbot.Initialize();

being in the same location as playerbot's just remove git's merge staments leave the code in place and go on or ether cyberium, xeross (or both) or blueboy needs to move this little code section up or down a couple lines on etherside and it will get rid of the problem. my opinion is it should be done on ahbot's side since it has been around and usable for far longer and would be easier (less code to move).

Link to comment
Share on other sites

This conflict happens no matter when you apply ahbot and playerbot or what order, I have tried both ways and get the same error and it's all because of:

being in the same location as playerbot's just remove git's merge staments leave the code in place and go on or ether cyberium, xeross (or both) or blueboy needs to move this little code section up or down a couple lines on etherside and it will get rid of the problem. my opinion is it should be done on ahbot's side since it has been around and usable for far longer and would be easier (less code to move).

Hi,

I haven't got a problem adjusting playerbot to accomodate this, I have already adjusted the code on my ahbot repo, so they do not conflict. I just do not want to keep changing it, everytime something alters in another project :o I have enough to do, keeping the core and playerbot :)

Cheers

Link to comment
Share on other sites

Just to back up what blueboy is saying here:

If you merge Playerbot with MaNGOS master first, then apply AHBot and other patches, you should have no trouble. It is a rather minor code conflict, but it has never raised any issues with my repo. I guess I'm too used to everything causing merge errors that this one has been a no-brainer to fix by hand.

It's a non-issue that has more to do with line-numbering than actual code conflicts.

Link to comment
Share on other sites

blueboy the problem isn't really for you to fix, but for the ahbot people because it's a slight line numbering thing where theirs is only 2 lines to ajust and I'm sorry but there's more than 10 lines on your side to move so it would be easier if they just moved it ether up or downto accomodate but then again it will be a mute point if it gets into the core soon...

Link to comment
Share on other sites

blueboy the problem isn't really for you to fix, but for the ahbot people because it's a slight line numbering thing where theirs is only 2 lines to ajust and I'm sorry but there's more than 10 lines on your side to move so it would be easier if they just moved it ether up or downto accomodate but then again it will be a mute point if it gets into the core soon...

Hi,

No problems, I understand ;). As you say, it's an easy fix. I have been following recent developments with auctionhouse and they are still tweaking the code, particularly in World.cpp (most recent change http://github.com/xeross/mangos/commit/3ff9b54eb263797ca2d76cef99b8a4ad0e21606f) where the conflict occurs. All being well, it shouldn't be long before it is introduced to the core. Until then, it might be best for you to move the necessary code.

As a side note: I requested that ScriptDev2.com make a small change to synchronize the scriptdev2.conf & config.h file version numbers, after a change to the core. It was a very small and easy fix, but my request was ignored. I got fed up of waiting, so I created the following fix.

This stops the warning during the server load, that SD2 configuration file could not be loaded properly.

diff --git a/src/bindings/ScriptDev2/config.h.in b/src/bindings/ScriptDev2/config.h.in
index bb3caf8..1605075 100644
--- a/src/bindings/ScriptDev2/config.h.in
+++ b/src/bindings/ScriptDev2/config.h.in
@@ -24,7 +24,7 @@

// Format is YYYYMMDDRR where RR is the change in the conf file
// for that day.
-#define SD2_CONF_VERSION    2009040501
+#define SD2_CONF_VERSION    2010062001

#ifdef WIN32
  #define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport)

(apply this patch after SD2 download and before server build).

Hope this helps

Link to comment
Share on other sites

If you play with mangos code it is handy to understand the way git works. Personally I use Pro Git book when there is a git question.

You need to: 1) add blueboy remote repository 2) pull blueboy/master into your build branch. Could be like this:

git remote add blueboy git://github.com/blueboy/mangos.git
git checkout your-build-branch
git pull blueboy master

Link to comment
Share on other sites

Because Filebeam is not a malicious URL :P

Hi,

Thanks for that, my bad. It was three in the morning when I read UnkleNuke's reply and I omitted to see the question mark. Perhaps, AVAST is a little over cautious in it's assessment of 'filebeam'. I did eventually get the archive to download by temporarily disabling AVAST. Once the file was on my box, I re-enabled the antivirus and scanned the archive. It was clean :)

Thanks

Link to comment
Share on other sites

Somtimes, free services like Filebeam may have ads displayed that can contain bad code. It's a shame these "sponsors" resort to such dirty tricks, because it hurts the reputation of some very good free sites like Filebeam. Like DaViper said, it was probably one of those ads that tripped a warning from your AV software.

I recommend to use either Firefox or Seamonkey with the NoScript add-on installed and proper browser security settings. I use Seamonkey with that setup. Only the content and domains I've allowed will load in my browser. As such, I've never had any warnings from my AV software or firewall while using free file and code hosting services.

With so much being supported by ads these days, you can expect to see NPC "sponsor bots" in WoW, someday. Perhaps there would be innkeepers whose gossips are rewritten to have an ad or a world boss fight that uses product placement, "Oh no! You must have had an energizing can of Red Bull™ to withstand my attacks so well!"

That's when you'll need to code an "anti-spambot bot" for us, blueboy. :P

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