Code: Show/Hide class botInfo; ... void setparent(botInfo * _parent) { parent = _parent; }; |
Code: Show/Hide class botInfo;
void botInfo::clear_objects(); void botInfo::object_target(Player *p); void botInfo::toggle_objects(); void botInfo::queue_enable(int id); void botInfo::queue_disable(int id); |
Cyan~Fire wrote: |
You guys don't really get it... the way MERVBot is setup you modify the actual botInfo class to make your bot do whatever it wants. Therefore you can't have one common class for all your plugins since it actually defines what your plugin does.
That's why I suggest reorganizing it a bit so that all the plugin-specific class inherit from botInfo. |
Quote: |
You're right with what you said, but he didn't modify the botInfo class! |
Quote: |
All he needs to do is to tell the compiler what methods botInfo has. |
Samapico wrote: |
But I DO need to modify the botInfo class for each different plugins afterwards |
Samapico wrote: |
That's what I'd want to do...but how? |
Code: Show/Hide #pragma once
#include "spawn.h" void doSomething(botInfo *bi, Player *p); |
Code: Show/Hide #include "common.h"
void doSomething(botInfo *bi, Player *p) { bi->sendMessage(p, "It works"); return; } |
Code: Show/Hide #include "spawn.h"
#include "common.h" void botInfo::EventTick() // I didn't code a plugin in a while { doSomething(this, somePlayer); } |