auction.mod's People
auction.mod's Issues
Object Oriented Programming
Actually i'm a bit afraid of messing with your code, because its a >4k line class...
I think separation will result in much more readable and extendable code.
For example:
- Split the different 'Views' of the Store into separate Classes.
- Have a class that handles message-parsing
- A Class for Settings
- A Class for the Ingame-Network (Different Implementations? See #9)
- ...
(Maybe i then will be not afraid anymore of implementing my issues myself ;) )
Generator - Save/Load Problems
Some scenarios that let the generator fail on loading/saving the messages. I think all of them affect WTS and WTB generator
One main problem is, when the generated message is too long, it messes up the wtsauc/wtbauc.txt file, because it doesn't save everything.
My suggestion and request is, to save everything, even though the message is too long.
The generated message and data (wts/wtbauc.txt) should be independent from each other. Because...
a) People also use the generator-view to input prices for cards they want to sell/buy for filtering in the other views of the mod and not generating a message.
b) Happened to me, that I inserted prices manually for 10minutes and they got lost.
- Goto WTS/B-Generator. Type in same price for many cards so message gets too long. Save it. On loading the plugin crashes, because the mod just saved half the message (without the price at the end etc.) -> http://pastebin.com/YPxzyJik
- Goto WTS/B-Generator. Type in prices for many cards (can be different prices) so message gets too long. Save it. On loading either many data is missing or the plugin crashes (if syntax in text file is not complete)
There are more scenarios where this can happen.
I think at the moment, you are using the content of the message-textbox to generate the wts/bauc.txt.
In my opinion you should use the data in the view to generate the save files.
Show Amount of Scrolls owned in front to Scroll Name
So it still does show for long names like "Potion of Resistance" or on low Resolutions
System.Collections.Generic.KeyNotFoundException
This Exception just came upon me:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[System.String,System.Int32].get_Item (System.String key) [0x00000] in <filename unknown>:0
at Auction.mod.Auction.searchmorethan3 (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
at Auction.mod.Auction.fullupdatelist (System.Collections.Generic.List`1 list, System.Collections.Generic.List`1 fulllist) [0x00000] in <filename unknown>:0
at Auction.mod.Auction.addcardstolist () [0x00000] in <filename unknown>:0
at Auction.mod.Auction.getaucitemsformmsg (System.String msgg, System.String from, System.String room) [0x00000] in <filename unknown>:0
at Auction.mod.Auction.AfterInvoke (ScrollsModLoader.Interfaces.InvocationInfo info, System.Object& returnValue) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
NullReferenceException: Object reference not set to an instance of an object
at ScrollsModLoader.ModInterceptor+<>c__DisplayClass4.<Unload>b__1 (Item lmod) [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[ScrollsModLoader.Item].GetIndex (Int32 startIndex, Int32 count, System.Predicate`1 match) [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[ScrollsModLoader.Item].Find (System.Predicate`1 match) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Unload (System.Collections.Generic.List`1 modsToUnload) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
at ChatRooms.ChatMessage (.RoomChatMessageMessage m) [0x00000] in <filename unknown>:0
at ArenaChat.handleMessage (.Message msg) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
at ArenaChat.handleMessage (.Message msg) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at Communicator.handleNextMessage () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
at Communicator.handleNextMessage () [0x00000] in <filename unknown>:0
at Communicator.Update () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
at Communicator.Update () [0x00000] in <filename unknown>:0
No idea, what caused it, but auction mod was gone afterwards current version: 09d02dc
Owned-Scrolls-Count only updates when visiting Deck Builder after shopping
When buying Scrolls from the Shop the 'Owned-Scroll-Count' does not increase.
Crash on "load WTB msg"
Remember the error on "load WTS msg" when some scrolls had the same price set and got seperated by commas?
You fixed that. But apparently it is still a problem with "load WTB msg".
Danke und Grüße :)
Make suggested price a range from min-max.
Or even show all 3 ScrollsPost-Prices
ingame Network with Channel messages instead of whispers
By reading your code i noticed, that you whisper every user in the auc-
channel to 'post' your WTS/WTB-Messages? why not just write the message to the channel instead? I think with more users this will be much more scale-able and will not result in being punished for whisper-spam.
Crash on "Price >= wts-generator"
Plugin crashes when I click on "Price >= wts-generator" in the WTB-View.
It does not always happen. My guess is, that it is a specific card?
Couldn't track it down yet.
{"roomName":"trading-1","from":"Binni","text":"WTB: 1x Corpus Collector 450g, 1xBrain Lice 400g, 2xLanguid 200g, 2xBlightbearer 150g, 1xEager Scryer 75g\r\nWTS: 3xBaleful Witch 800g, 1xMachine Divinator 750g, 2xBloodline Taint 450g, 3xIre and Bile 300g","msg":"RoomChatMessage"}
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[System.Int32,System.String].get_Item (Int32 key) [0x00000] in <filename unknown>:0
at Auction.mod.AuctionFilter.isBeyondPriceRange (Auction.mod.Auction a) [0x00000] in <filename unknown>:0
at Auction.mod.AuctionFilter.isFiltered (Auction.mod.Auction a) [0x00000] in <filename unknown>:0
at Auction.mod.AuctionHouse.addAuction (Auction.mod.Auction a) [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[Auction.mod.Auction].ForEach (System.Action`1 action) [0x00000] in <filename unknown>:0
at Auction.mod.AuctionHouse.addAuctions (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
at Auction.mod.AuctionMod.AfterInvoke (ScrollsModLoader.Interfaces.InvocationInfo info, System.Object& returnValue) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
NullReferenceException: Object reference not set to an instance of an object
at ScrollsModLoader.ModManager.disableMod (ScrollsModLoader.LocalMod mod, Boolean rebuild) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModLoader.unloadMod (ScrollsModLoader.LocalMod mod) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Unload (System.Collections.Generic.List`1 modsToUnload) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
at ChatRooms.ChatMessage (.RoomChatMessageMessage m) [0x00000] in <filename unknown>:0
at ArenaChat.handleMessage (.Message msg) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
at ArenaChat.handleMessage (.Message msg) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at MiniCommunicator._dispatchMessageToListeners (.Message msg) [0x00000] in <filename unknown>:0
at MiniCommunicator._handleMessage (.Message msg) [0x00000] in <filename unknown>:0
at MiniCommunicator._updateReceive () [0x00000] in <filename unknown>:0
at MiniCommunicator.Update () [0x00000] in <filename unknown>:0
OT: contact
Hi,
don't know how to get in touch with you, besides opening an issue here ^^
Please check my PM to you on scrollsguide forums.
Thanks!
Only highlight WTS/WTB-Buttons after filters
Or maybe even add 2 different highlights:
'New WTB' and 'New WTB i'm interested in' (filters, >3, ...)
Align Auction table more properly
I think we should align the auction table more properly:
- Find out, how many characters a player name can have.
- Move the sellername and the date to the right. (I don't think we will see a gold inflation or very expensive
>9999g
Scrolls anytime soon. - to be very save we could assume99999g
as max) - Use
123g
for the price instead123 G
, because its shorter and a more common unit-notation - Use separate Column for Scroll-Amount owned, so that the scroll-names start at the same row and are not moved because of
1
having less width than2
(See image below) - Maybe make the 'resource'-icon optionally/remove them
- Fix the
...
(See below)
Request: Different Save files
This feature request is a bit tied to #31
It would be nice to be able to choose the file where wts/wtb gets loaded from.
The class "modapi" in BaseMod already gives you the method to open the dialog modAPI.FileOpenDialog()
I think the old behaviour should stay the same so it defaults to wtb/wtsauc.txt on button click.
Suggestion. Either let me set the files in the settings dialog. Or (which I like better) open the file dialog when i STRG+click the buttons (or right-click?)
Scenario is, that it would be nice to have one dataset where I store prices for filtering in the other view (see #31 ) and one set for actually generating messages.
Danke! :)
Problems with weird messages
Crashed / Disabled Because of multiple auctions of same scroll in same message?
"roomName":"trading-1","from":"Ilpe","text":"WTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000gWTB Breaker 1000g","msg":"RoomChatMessage"}
(Filename: C:/BuildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)
System.ArgumentException: Can only add auctions to the spamfilter in a time-sorted manner
at Auction.mod.SpamFilter.addAuction (Auction.mod.Auction a) [0x00000] in <filename unknown>:0
at Auction.mod.AuctionHouse.addAuction (Auction.mod.Auction a) [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[Auction.mod.Auction].ForEach (System.Action`1 action) [0x00000] in <filename unknown>:0
at Auction.mod.AuctionHouse.addAuctions (System.Collections.Generic.List`1 list) [0x00000] in <filename unknown>:0
at Auction.mod.AuctionMod.AfterInvoke (ScrollsModLoader.Interfaces.InvocationInfo info, System.Object& returnValue) [0x00000] in <filename unknown>:0
at ScrollsModLoader.ModInterceptor.Intercept (IInvocationInfo info) [0x00000] in <filename unknown>:0
Probably fixed by using a <= at SpamFilter Line 57
i think having an empty if for lastTimeTheAuctionHasBeenPosted == a.time
is the way to go, so we just have the entry in the list one time.
spammfilter problem with adding messages
if you get messages in an gap smaller than the spam-filter-time,
there are no updates:
example:
filter-time = 100;
time=0: wts burn 100
time=30s wts burn 100
time=1min, 5s wts burn 100
so only the burn with time =0 is shown in ah.
only if you change some search-filters, or go to settings menue and change the filter-time, (or filterchanged==true) the burn with wts=30s is shown.
problem: only keep the first two new entrys in timesTheSameAuctionHasBeenPosted.
possible fix:
in SpammFilter->addauction, only delete the entrys in timesTheSameAuctionHasBeenPosted, if they are older than the first not-filtered item-Datetime.
and change in isFilteredBySpamFilter
if (timesTheSameAuctionHasBeenPosted[1] > a.time)
to if (timesTheSameAuctionHasBeenPosted[...Count-1] > a.time)
discuss
Problems when joining a game while 'connected'.
I think my game just crashed because of this mod:
I connected to the network - started a game - after finishing it i got an error message about not being authenticated when trying to join multiple rooms.
Now i can't log in anymore because of 'Nullpointerexception'...
#: filter not working
because CardFilter.isIncluded(...)
does not check the collection filters.
You need to use CardFilter.filterList
(or something like that) and this list of scrolls will then be counted for the amount filter.
Not removing duplicates
New Column: Amount of Scrolls already owned
I always feel the urge to recheck in deckbuilder if i really own less than 3 of something.
Request: Correct WTB/WTS when cards sold/bought
I have a request for something that is missing for me.
Following scenario:
I go to the WTS-Generator and filter by "cards owned > 3". Fill/Set the prices and generate my message.
Now, someone buys a card from me. So I don't own more than 3 of that card anymore.
When I go back to the WTS-Generator to update my wts-message, I have to manually disable the ">3"-filter, find the card I just sold and remove the price, so it does not get included in the message anymore.
It would be nice to have the possibility to remove prices from cards, that do not fit the filter anymore (in this case ">3").
Maybe a new button next to the "Clear" button like "Clear filtered".
(same goes for WTB with "<3")
Danke!
Message Parsing Issue
Save Settings
For even more awesomeness in this mod.
PStr only shows auction where scroll owned "> 0"?
Realized something while using the mod on my second account (which does not have many scrolls).
The Player Store only shows auctions from which I already own at least one card.
So for example... I have "Flip" in my collection. I can see auctions regarding "Flip".
I don't have any "Aging Knight" in my collection. So I can't see any auction regarding "Aging Knight"
Update: I think same goes also for the listing of trades in AH->WTS/WTB
Group 'Auctions' by Scroll - only sort them up if they get cheaper(WTB)/more expensive(WTS)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.