Jump to content

[Patch] Auction House Bot (Xeross' Branch)


Recommended Posts

  • Replies 717
  • Created
  • Last Reply

Top Posters In This Topic

Can't you all be interested in a single, multi-maintainer, fork from mangos with AHBot ?

If Cyberium is OK, i'll use its patch to make my ahbot work with all 3 factions.

If this helps, I can add users to my mangos fork on github wich is already ready for ahbot

Link to comment
Share on other sites

Can't you all be interested in a single, multi-maintainer, fork from mangos with AHBot ?

If Cyberium is OK, i'll use its patch to make my ahbot work with all 3 factions.

If this helps, I can add users to my mangos fork on github wich is already ready for ahbot

very good idea !

By the way I have this "morning" 2 questions for all of you guys:

- my pourcentage for white items and greys items is 0 "but" I still have these items in the auction house (more than 1 :) )

- can not "we" "just" switch the user id of human holding the AH to a monster user id and make Vladimir happy ?

Link to comment
Share on other sites

OK, just before going on holidays, i'v integrated Cyberium last patch into my own ahbot branch. (mangos-ahbot)

I've pushed it to github and merged all my other branches with.

Compilation seems OK, bot not tested !

it's merged with the lastest mangos patch also !

So, keep an eye on, i'll check compiling/running (but no network) while on holidays. You can ask for participating to this repo on github in the meanwhile

Thanks you all !

CU

Link to comment
Share on other sites

It has always been a very odd behavior of the AHBot that even when the percentage of an item color is set to zero, it will always continue to offer some items of that color.

I think that somewhere in the AHBot code, something is preventing the percentages from being truly zero and returns a value of at least "1" instead.

The entire code base needs a complete rewrite to fix such logic errors, have better error trapping, and replace the player character with an NPC. One must bear in mind this is based on a very old patch that has been maintained over the years, after the author left, but not actually developed much beyond keeping it updated with the MaNGOS core.

Link to comment
Share on other sites

Make all you want with my patch. That's why i post it here :)

No problem for me.

Cheers

Ps : Yeah UnkleNuke. I was too lazy too to work on it because it's not an hard issue. Anyway i will probably take time on it if i have time.

Ps2 : Mrelfire, don't know if your second point is possible but make AHBOT free of creating an account will be a good feature.

Link to comment
Share on other sites

Very good to hear xeross, and glad your back...just one qustion since you've been maintaining this. Is it possible to do as Vladamir wanted and make the ahbot totaly NPC based and cut out the character so he could get it in the core permantly?

If you have any idea on how we need to do this, it would probably involve modifying the auctionhouse core and check for a certain ID or something, can an NPC even put up an AH order currently ?

Link to comment
Share on other sites

Nice to see you back Xeross155.

can an NPC even put up an AH order currently?

Didn't see that. Anyway we just need to create a new addauction method and handle correctly item added by ahbot on ending of auction because no real owner will be defined.

Iam just trying to make it possible.

Link to comment
Share on other sites

For creation of auction this code work without any new core hack.

   AuctionHouseEntry const* ahEntry = sAuctionMgr.GetAuctionHouseEntryByFaction(12);
   AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(ahEntry);
   uint32 itemID = 37809;
   Item* item = Item::CreateItem(itemID, 1);
   if (item == NULL)
   {
           sLog.outString("AuctionHouseBot> Item::CreateItem() returned NULL");
           return;
   }
   AuctionEntry* auctionEntry = new AuctionEntry;
   auctionEntry->Id = sObjectMgr.GenerateAuctionID();
   auctionEntry->item_guidlow = item->GetGUIDLow();
   auctionEntry->item_template = item->GetEntry();
   auctionEntry->owner = 0;
   auctionEntry->startbid = 1000;
   auctionEntry->buyout = 10000;
   auctionEntry->bidder = 0;
   auctionEntry->bid = 0;
   auctionEntry->deposit = 0;
   auctionEntry->expire_time = (time_t) (urand(2, 5) * 60 * 60 + time(NULL));
   auctionEntry->auctionHouseEntry = ahEntry;
   item->SaveToDB();
   sAuctionMgr.AddAItem(item);
   auctionHouse->AddAuction(auctionEntry);
   auctionEntry->SaveToDB();

I still don't know whats happen on the end of the auction.

No name on seller row in AH. I think it's not the best sollution because of this.

No matter what GUID i will assign to owner it will be take from characters table. So the best like i was supposed is to rewrite 'add auction' method to handle npc name in place of character name.

Link to comment
Share on other sites

Could mangos not come with 5 accounts configured at creation instead of just the four standard ones.. making account 5 by default the reserved for auctionhousebot.. adding some form of check for the account to enable and disable it ie if acount 5 = ahbot then code else disable rather than hacking the core to pieces and just work on the mechanics of the ahbot.. cus surely either way its going to have to have an item owner details etc..

Sorry if im babbling, not that great at coding as you can see :D

Link to comment
Share on other sites

Whyarp, surely that is already done now by most people using AHBot.

Account requirement is not necessary. The job must be done by someone :)

Ok for all.

My code work for now, at the end of auction item is deleted (cannot found it in database).

So the only need is to add name to seller and no npc needed too.

Olso i didn't realised this before but there is a bad behavior with actual system.

When auction is finished without buyer items is returned to his owner by mail. If you look into mail table (on characters db) there is too much mail attribued to AhBot account... I set the min/maxitem to 5000/7000 per faction... You can imagine how many mail is generated...

Link to comment
Share on other sites

If iam not wrong

bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
{
   ...
   data << uint32(pItem->GetSpellCharges());               //item->charge FFFFFFF
   data << uint32(0);                                      //Unknown
   data << uint64(owner);                                  //Auction->owner
   data << uint32(startbid);                               //Auction->startbid (not sure if useful)
   data << uint32(bid ? GetAuctionOutBid() : 0);
   ...
}

We send only GUID to client, so i don't know how i can assign a name to an unassigned GUID... Someone have idea?

If no solution, have no name in seller row is it realy an issue?

Link to comment
Share on other sites

Can you not add another column to the auctions database to say that the auction is owned by an npc and NOT a player, and if the flag is set to true, branch off in to another section of code for that specific auction? or something :D lol.. ima shut up now..

Link to comment
Share on other sites

Can you not add another column to the auctions database to say that the auction is owned by an npc and NOT a player, and if the flag is set to true, branch off in to another section of code for that specific auction? or something :D lol.. ima shut up now..

Vladimir has requested a NPC ...

Link to comment
Share on other sites

maybe we can use guid 0, it will never be assigned to a player right?, and then harcode a name to guid 0 like auctioneer o AHBot or whatever?

It work, no problem detected. You can make test on setting account of AHBOT to 0 and player to 0 on the config file.

The only problem is that we see nothing on seller name. But i already ask you, is this realy an issue? If not the code will be easly cleaned and not need lotof hack.

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