experienced
Intermediate OT User
hey
i have tfs 0.3.4pl2 8.42 and i need display hits on default no server log only hits ;p like: You deal xxx damage to a xxxx
what i must do?
i have this in player.cpp
but can't compile errors:
i have tfs 0.3.4pl2 8.42 and i need display hits on default no server log only hits ;p like: You deal xxx damage to a xxxx
what i must do?
i have this in player.cpp
Code:
void Player::onAttackedCreatureDrain(Creature* target, int32_t points)
{
Creature::onAttackedCreatureDrain(target, points);
if(party && target && (!target->getMaster() || !target->getMaster()->getPlayer())
&& target->getMonster() && target->getMonster()->isHostile()) //we have fulfilled a requirement for shared experience
getParty()->addPlayerDamageMonster(this, points);
char buffer[100];
sprintf(buffer, "You deal %d damage to %s.", points, target->getName().c_str());
sendTextMessage(MSG_STATUS_DEFAULT, buffer);
}
void Player::onSummonAttackedCreatureDrain(Creature* summon, Creature* target, int32_t points)
{
Creature::onSummonAttackedCreatureDrain(summon, target, points);
char buffer[100];
sprintf(buffer, "Your %s deals %d damage to %s.", summon->getName().c_str(), points, target->getName().c_str());
sendTextMessage(MSG_EVENT_DEFAULT, buffer);
}
but can't compile errors:
Code:
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Administrator\Pulpit\0.3.4pl2.r96\dev-cpp\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\Administrator\Pulpit\0.3.4pl2.r96\dev-cpp\Makefile.win" all
g++.exe -c ../player.cpp -o obj//player.o -I"F:/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -fexpensive-optimizations -O1
../player.cpp:3515: error: no `void Player::onAttackedCreatureDrain(Creature*, int32_t)' member function declared in class `Player'
../player.cpp: In member function `void Player::onAttackedCreatureDrain(Creature*, int32_t)':
../player.cpp:3516: error: `onAttackedCreatureDrain' is not a member of `Creature'
../player.cpp: At global scope:
../player.cpp:3527: error: no `void Player::onSummonAttackedCreatureDrain(Creature*, Creature*, int32_t)' member function declared in class `Player'
../player.cpp: In member function `void Player::onSummonAttackedCreatureDrain(Creature*, Creature*, int32_t)':
../player.cpp:3528: error: `onSummonAttackedCreatureDrain' is not a member of `Creature'
make.exe: *** [obj//player.o] Error 1
Execution terminated
Last edited: