Fernanda Peres
New Member
- Joined
- Aug 12, 2015
- Messages
- 10
- Reaction score
- 0
Is there any way to add that the source code, a way to send the name of the person who killed the player and the lvl? only we did not even have to be the name of the player and summon, the group killed or anything, might be just the person who gave the last hit and lvl, equal is the body of information, because this tfs I use it does not send the death to mysql
Code:
Item* Player::getCorpse()
{
Item* corpse = Creature::getCorpse();
if(corpse && corpse->getContainer()){
std::stringstream ss;
ss << "You recognize " << getNameDescription() << ".";
Creature* lastHitCreature = NULL;
Creature* mostDamageCreature = NULL;
if(getKillers(&lastHitCreature, &mostDamageCreature) && lastHitCreature)
{
ss << " " << (getSex() == PLAYERSEX_FEMALE ? "She" : "He") << " was killed by "
<< lastHitCreature->getNameDescription() << ".";
}
corpse->setSpecialDescription(ss.str());
}
return corpse;
}
/*
{
Item* corpse = Creature::getCorpse();
if(corpse && corpse->getContainer())
{
Creature* lastHitCreature_ = NULL;
Creature* mostDamageCreature = NULL;
char buffer[190];
if(getKillers(&lastHitCreature_, &mostDamageCreature) && lastHitCreature_)
sprintf(buffer, "You recognize %s. %s was killed by %s.", getNameDescription().c_str(), (getSex() == PLAYERSEX_FEMALE ? "She" : "He"), lastHitCreature_->getNameDescription().c_str());
else
sprintf(buffer, "You recognize %s.", getNameDescription().c_str());
corpse->setSpecialDescription(buffer);