ckripz
Member
- Joined
- May 30, 2013
- Messages
- 68
- Reaction score
- 7
Hello! good afternoon, I have a detail with a script.
I have a movement script, what it does is that when you step on the floor the script gives you an outfit, everything is fine here, if you give me the outfit but what it doesn't give me is the addon, I suppose it is because I don't have it unlocked , but my question is this that I have to modify in sources so that the CONDITION_OUTFIT if it gives me the outfit with all the addons even if I have blocked that addon.
Mi server is TFS 1.3
It should be clarified that in account management the script works because it has unlocked all the outfits, but it does not work with a player who does not have that addon.
modify this part without results in game.cpp.
In advance thanks for the help. excuse the english translated in translate.google xDD
I have a movement script, what it does is that when you step on the floor the script gives you an outfit, everything is fine here, if you give me the outfit but what it doesn't give me is the addon, I suppose it is because I don't have it unlocked , but my question is this that I have to modify in sources so that the CONDITION_OUTFIT if it gives me the outfit with all the addons even if I have blocked that addon.
Mi server is TFS 1.3
It should be clarified that in account management the script works because it has unlocked all the outfits, but it does not work with a player who does not have that addon.
modify this part without results in game.cpp.
Lua:
void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit)
{
if (!g_config.getBoolean(ConfigManager::ALLOW_CHANGEOUTFIT)) {
return;
}
Player* player = getPlayerByID(playerId);
if (!player) {
return;
}
if (outfit.lookMount != 0) {
Mount* mount = mounts.getMountByClientID(outfit.lookMount);
if (!mount) {
return;
}
if (!player->hasMount(mount)) {
return;
}
if (player->isMounted()) {
Mount* prevMount = mounts.getMountByID(player->getCurrentMount());
if (prevMount) {
changeSpeed(player, mount->speed - prevMount->speed);
}
player->setCurrentMount(mount->id);
} else {
player->setCurrentMount(mount->id);
outfit.lookMount = 0;
}
} else if (player->isMounted()) {
player->dismount();
}
//this code add
if (player->hasCondition(CONDITION_OUTFIT)) {
player->defaultOutfit = outfit;
internalCreatureChangeOutfit(player, outfit);
}
//end this code add
if (player->canWear(outfit.lookType, outfit.lookAddons)) {
player->defaultOutfit = outfit;
if (player->hasCondition(CONDITION_OUTFIT)) {
return;
}
internalCreatureChangeOutfit(player, outfit);
}
}
In advance thanks for the help. excuse the english translated in translate.google xDD