AAEmu/AAEmu

Auction kick during buy item

melcosoftclub opened this issue · 7 comments

09:21:14 [WARN] Behavior - PickSkillAndUseIt:UseSelfSkill Owner.ObjId 57089, Owner.TemplateId 5523, SkillId 11759
09:21:20 [ERROR] PacketMarshaler - GamePacket: C->S type 0B9 .C2G.CSBidAuctionPacket
09:21:20 [FATAL] PacketMarshaler - System.NullReferenceException: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object.
   at AAEmu.Game.Core.Managers.NameManager.<>c__DisplayClass5_0.<GetCharacterId>b__0(KeyValuePair`2 x) in C:\AA-Relese\AAEmu.Game\Core\Managers\NameManager.cs:line 28
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at AAEmu.Game.Core.Managers.NameManager.GetCharacterId(String characterName) in C:\AA-Relese\AAEmu.Game\Core\Managers\NameManager.cs:line 28
   at AAEmu.Game.Core.Managers.MailManager.Send(BaseMail mail) in C:\AA-Relese\AAEmu.Game\Core\Managers\MailManager.cs:line 61
   at AAEmu.Game.Models.Game.Mails.BaseMail.Send() in C:\AA-Relese\AAEmu.Game\Models\Game\Mails\BaseMail.cs:line 53
   at AAEmu.Game.Core.Managers.AuctionManager.BidOnAuctionItem(Character player, UInt64 auctionId, Int32 bidAmount) in C:\AA-Relese\AAEmu.Game\Core\Managers\AuctionManager.cs:line 179
   at AAEmu.Game.Core.Packets.C2G.CSBidAuctionPacket.Read(PacketStream stream) in C:\AA-Relese\AAEmu.Game\Core\Packets\C2G\CSBidAuctionPacket.cs:line 51
   at AAEmu.Game.Core.Network.Game.GamePacket.Decode(PacketStream ps) in C:\AA-Relese\AAEmu.Game\Core\Network\Game\GamePacket.cs:line 88
   at AAEmu.Game.Core.Network.Game.GameProtocolHandler.OnReceive(GameConnection connection, Byte[] buf, Int32 bytes) in C:\AA-Relese\AAEmu.Game\Core\Network\Game\GameProtocolHandler.cs:line 147
09:21:20 [INFO] GameProtocolHandler - Client from 109.165.50.27 disconnected
09:21:20 [INFO] Server - Connect from session id: 3fa97a41-e39e-4d96-8cc4-a634881e46e7 disconnected
09:21:20 [ERROR] GameProtocolHandler - System.NullReferenceException: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object.
   at AAEmu.Game.Core.Managers.NameManager.<>c__DisplayClass5_0.<GetCharacterId>b__0(KeyValuePair`2 x) in C:\AA-Relese\AAEmu.Game\Core\Managers\NameManager.cs:line 28
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at AAEmu.Game.Core.Managers.NameManager.GetCharacterId(String characterName) in C:\AA-Relese\AAEmu.Game\Core\Managers\NameManager.cs:line 28
   at AAEmu.Game.Core.Managers.MailManager.Send(BaseMail mail) in C:\AA-Relese\AAEmu.Game\Core\Managers\MailManager.cs:line 61
   at AAEmu.Game.Models.Game.Mails.BaseMail.Send() in C:\AA-Relese\AAEmu.Game\Models\Game\Mails\BaseMail.cs:line 53
   at AAEmu.Game.Core.Managers.AuctionManager.BidOnAuctionItem(Character player, UInt64 auctionId, Int32 bidAmount) in C:\AA-Relese\AAEmu.Game\Core\Managers\AuctionManager.cs:line 179
   at AAEmu.Game.Core.Packets.C2G.CSBidAuctionPacket.Read(PacketStream stream) in C:\AA-Relese\AAEmu.Game\Core\Packets\C2G\CSBidAuctionPacket.cs:line 51
   at AAEmu.Game.Core.Network.Game.GamePacket.Decode(PacketStream ps) in C:\AA-Relese\AAEmu.Game\Core\Network\Game\GamePacket.cs:line 88
   at AAEmu.Game.Core.Network.Game.GameProtocolHandler.OnReceive(GameConnection connection, Byte[] buf, Int32 bytes) in C:\AA-Relese\AAEmu.Game\Core\Network\Game\GameProtocolHandler.cs:line 147
09:21:23 [WARN] Behavior - PickSkillAndUseIt:UseSelfSkill Owner.ObjId 57090, Owner.TemplateId 5524, SkillId 11759
09:21:25 [WARN] Behavior - PickSkillAndUseIt:UseSelfSkill Owner.ObjId 57089, Owner.TemplateId 5523, SkillId 11759
09:21:25 [INFO] StreamProtocolHandler - Client from 109.165.50.27 disconnected
09:21:25 [INFO] Server - Connect from session id: 84b51c08-979d-46e4-a58d-85aba1c32a18 disconnected

Was this on a newly created character?
As in, was there a server restart in between the character creation, and this error?

No. Character level - buyer 25, seller 15

There was no issues on creation of characters or item on sale.
Also - this is a last dev version of server.

Last dev version? Which branch specifically?

Last dev version? Which branch specifically?

https://github.com/AAEmu/AAEmu/tree/develop

It looks like this is a bug, where it's unable to send the Bid Canceled mail to the previous bidder.
Looking at the code, this is because the BidderName was assigned, but not their playerId (and it only checked for the name)
This looks like a oversight that snuck in there at some point.

This is fixed with PR #642