What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Products's local Loader from Raphus [ Multi-projects Supported ]

@alisha

Well-Known Member
Joined
Sep 29, 2012
Messages
4,063
Reaction score
21
Raphus made for us Generic Loader, so you can easy load your projects locally,

as for example HB default compiler for now do not support multi-projects and WPF projects, so they have to be precompiled by Visual Studio and loaded from Loader.

This loader will make all developers to have same way of loading projects and avoid to reinvent own bike.

The way how i use it:

Post-build event:

Add post-build event to your project, which will copy compiled by Visual Studio DLL's and Loader file to HB local folder for example:

SET HBPATH=C:\BB\HonorbuddyNightly 2.5.14463.2127
SET RELEASEPATH=%HBPATH%\Bots\MyBot
xcopy /Y /R "$(ProjectDir)bin\Debug\MyBot.dll" "%RELEASEPATH%"
xcopy /Y /R "$(ProjectDir)bin\Debug\Library.dll" "%RELEASEPATH%"
xcopy /Y /R "$(ProjectDir)GenericLoader.cs" "%RELEASEPATH%"

Prepair Loader file

In Loader Edit name of your Product and folder, where it located (Bots, Plugins or Routines):
private static readonly string LoaderPath = Path.Combine(Utilities.AssemblyDirectory, "Bots", "MyBot");

Working with Product Locally

Each time you made changes, just recompile Solution (make sure you didn't forgot to set order of compile and dependences for multi-projects)

Done, Start HB :)
 

Attachments

Last edited:
File updated, comments from @Raphus:
Routine had some members wrong
 
This does not support multiple CRs/plugins/botbases in the same DLL (Weischbier had a problem with this here: https://www.thebuddyforum.com/threads/multi-class-support-and-combatroutine-overrides.401924/).
I suggest you change it to at least support the common case of multiple CRs, one per class, by adding a filter to the GetInstanceOfType function and changing CombatRoutineWrapper ctor to something like:
Code:
Instance = LoaderHelper.GetInstanceOfType<CombatRoutine>(cr => cr.Class == StyxWoW.Me.Class);
 
This does not support multiple CRs/plugins/botbases in the same DLL (Weischbier had a problem with this here: https://www.thebuddyforum.com/threads/multi-class-support-and-combatroutine-overrides.401924/).
I suggest you change it to at least support the common case of multiple CRs, one per class, by adding a filter to the GetInstanceOfType function and changing CombatRoutineWrapper ctor to something like:
Code:
Instance = LoaderHelper.GetInstanceOfType<CombatRoutine>(cr => cr.Class == StyxWoW.Me.Class);
This is up to Raphus, he is author of it, not me. Feel free to post updated version of Loader with changes, i will update link in first post.

p.s. i think it do not meant to support multiple products in same dll when was originally designed, assuming each product will have it's own folder and it's own copy of loader.
 
Last edited:
Back
Top