Instaling boost other version than 1.52 (default that came with FREEBSD 8.2) is a pain in the ***. I tried to downgrade the version with no results. Can you give me an advice?
PS: More examples (especially with packets) will be nice.
Instaling boost other version than 1.52 (default that came with FREEBSD 8.2) is a pain in the ***. I tried to downgrade the version with no results. Can you give me an advice?
PS: More examples (especially with packets) will be nice.
(deinstall boost first)
Grab the version you want off of here:
In there is a "boost"-Folder containing all kinds of headers and such
Just drop that one into /usr/local/include and you should be set
UP !
It would be nice if add some samples for adding quest functions (item table, pc table..) and even for new packets in the documentation.
You can only add new quest function tables.
So you'll have to use item2, pc2 and the sorts
I'll add examples after my vacation (~sunday next week)
As for packets:
You'd have to hook CInput<PHASE>::Analyze
where <PHASE> is the phase you want to add new packets in.
e.g. Main for the "ingame"-Phase
Check if the header matches one of yours and execute that one, if not execute the original function.
Pretty much like the command function I have already in place.
It's nearly impossible the function UseItemEx has over 900 variables and 7500 lines of code ^^
Again: You could hook it - check if it's an item you want to modify
If it is - execute yours otherwise just run the original function.
No need to rewrite it
I might even add an interface for that at some point (adding custom items)
Again: You could hook it - check if it's an item you want to modify
If it is - execute yours otherwise just run the original function.
No need to rewrite it
I might even add an interface for that at some point (adding custom items)
iMer
Yip, but if you want to overwrite an existing function you have to rewrite it. Or to hook the original function which is called hope it's nowher other used and let it do nothing.
Yip, but if you want to overwrite an existing function you have to rewrite it. Or to hook the original function which is called hope it's nowher other used and let it do nothing.
if (self->m_map_command.find(arguments.front())!=self->m_map_command.end()) { // Check if custom command exists ICommand* cmd = self->m_map_command[arguments.front()]; if (cmd->usableFor(ch)) { // check if command is useable cmd->use(ch, arguments); // if useable, use it return; } else if(cmd->isReplaced()) { // if not usable, but replaced - send "command not found"-chatpacket ch->ChatPacket(1,locale_find("그런 명령어는 없습니다")); return; } } // if no custom command, just let the original function handle the rest self->detour_interpretCommand->GetOriginalFunction()(ch,data,len); }
if (self->m_map_command.find(arguments.front())!=self->m_map_command.end()) { // Check if custom command exists
ICommand* cmd = self->m_map_command[arguments.front()];
if (cmd->usableFor(ch)) { // check if command is useable
cmd->use(ch, arguments); // if useable, use it
return;
} else if(cmd->isReplaced()) { // if not usable, but replaced - send "command not found"-chatpacket
ch->ChatPacket(1,locale_find("그런 명령어는 없습니다"));
return;
}
}
// if no custom command, just let the original function handle the rest
self->detour_interpretCommand->GetOriginalFunction()(ch,data,len);
}
I am using Codeblocks with uniwin to do the compiling for me
Other than that you'll need gcc48 (or higher) and a FreeBSD (32bit) system to compile on.
I myself use a vm for that.
What you'll have to do is install gcc48 and move the old gcc/g++ commands to gcc_old or something and then rename the new gcc48 to gcc (same with g++)