Imfreezing
Krossa Kapitalismen
Hello, what should i edit, in source in order to make so people can't walk through each other in depot!
0.4 3777!
Thanks alot in advance!
0.4 3777!
Thanks alot in advance!
I can go through people that are lower level than my self.You can't enter other people in depot. o.o
These people are under the protection level i think.I can go through people that are lower level than my self.
yeah,any fix to this ?These people are under the protection level i think.
Should I simply remove this line ?Player::canWalkThrough in player.cpp.
Should I simply remove this line ?
bool Player::canWalkthrough(const Creature* creature) const
Im sorry im not very good at this,what exactly should I modify this to?No you should modify it.
No you should modify it.
da bomb <:See? as i said yesterday, normal people are not webmasters, super coders programmers, and can not understand the codes u guys pass us.
Please, if u guys dont wanna TEACH us, please, send us MADED CODE because we are noob, not professional, and do not understand and do not know what need to be donne in the scripts.
At least it should be in the interest to learn and try to collect information.See? as i said yesterday, normal people are not webmasters, super coders programmers, and can not understand the codes u guys pass us.
Please, if u guys dont wanna TEACH us, please, send us MADED CODE because we are noob, not professional, and do not understand and do not know what need to be donne in the scripts.
See? as i said yesterday, normal people are not webmasters, super coders programmers, and can not understand the codes u guys pass us.
Please, if u guys dont wanna TEACH us, please, send us MADED CODE because we are noob, not professional, and do not understand and do not know what need to be donne in the scripts.
Would be good if you posted the solution. So if other people serach for this can find this.welcome
Quoting @hebaWould be good if you posted the solution. So if other people serach for this can find this.
change
bool Player::canWalkthrough(const Creature* creature) const
{
if(creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() ||
(creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster())))
return true;
const Player* player = creature->getPlayer();
if(!player)
return false;
if((((g_game.getWorldType() == WORLDTYPE_OPTIONAL &&
#ifdef __WAR_SYSTEM__
!player->isEnemy(this, true) &&
#endif
player->getVocation()->isAttackable()) || (player->getVocation()->isAttackable() &&
player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground &&
Item::items[player->getTile()->ground->getID()].walkStack) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)
|| player->getAccess() <= getAccess()))
return true;
return (player->isGhost() && getGhostAccess() < player->getGhostAccess())
|| (isGhost() && getGhostAccess() > player->getGhostAccess());
}
________________________________________________________________________________
to to to
________________________________________________________________________________
bool Player::canWalkthrough(const Creature* creature) const
{
if(creature == this || creature->isWalkable() ||
(creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster())))
return true;
const Player* player = creature->getPlayer();
if(!player)
return false;
if(
(
(
(
(
player->getVocation()->isAttackable() &&
player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::pROTECTION_LEVEL)
)
|| (
player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) &&
!player->getTile()->hasFlag(TILESTATE_HOUSE)
)
)
) && player->getTile()->ground &&
player->getTile()->ground->getID() != 11063
) && (
!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)
|| player->getAccess() <= getAccess()
)
) return true;
return (player->isGhost() && getGhostAccess() < player->getGhostAccess())
|| (isGhost() && getGhostAccess() > player->getGhostAccess());
}
bool Player::canWalkthrough(const Creature* creature) const
{
if(creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() ||
(creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster())))
return true;
const Player* player = creature->getPlayer();
if(!player)
return false;
if((((g_game.getWorldType() == WORLDTYPE_OPTIONAL &&
#ifdef __WAR_SYSTEM__
!player->isEnemy(this, true) &&
#endif
player->getVocation()->isAttackable()) || (player->getVocation()->isAttackable() &&
player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground &&
Item::items[player->getTile()->ground->getID()].walkStack) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)
|| player->getAccess() <= getAccess()))
return true;
return (player->isGhost() && getGhostAccess() < player->getGhostAccess())
|| (isGhost() && getGhostAccess() > player->getGhostAccess());
}
bool Player::canWalkthrough(const Creature* creature) const
{
if(creature == this || creature->isWalkable() ||
(creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster())))
return true;
const Player* player = creature->getPlayer();
if(!player)
return false;
if(
(
(
(
(
player->getVocation()->isAttackable() &&
player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::pROTECTION_LEVEL)
)
|| (
player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) &&
!player->getTile()->hasFlag(TILESTATE_HOUSE)
)
)
) && player->getTile()->ground &&
player->getTile()->ground->getID() != 11063
) && (
!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)
|| player->getAccess() <= getAccess()
)
) return true;
return (player->isGhost() && getGhostAccess() < player->getGhostAccess())
|| (isGhost() && getGhostAccess() > player->getGhostAccess());
}
@hebaIn player.cpp
Change
Code:bool Player::canWalkthrough(const Creature* creature) const { if(creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if(!player) return false; if((((g_game.getWorldType() == WORLDTYPE_OPTIONAL && #ifdef __WAR_SYSTEM__ !player->isEnemy(this, true) && #endif player->getVocation()->isAttackable()) || (player->getVocation()->isAttackable() && player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground && Item::items[player->getTile()->ground->getID()].walkStack) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) || player->getAccess() <= getAccess())) return true; return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); }
To
Code:bool Player::canWalkthrough(const Creature* creature) const { if(creature == this || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if(!player) return false; if( ( ( ( ( player->getVocation()->isAttackable() && player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::pROTECTION_LEVEL) ) || ( player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) && !player->getTile()->hasFlag(TILESTATE_HOUSE) ) ) ) && player->getTile()->ground && player->getTile()->ground->getID() != 11063 ) && ( !player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) || player->getAccess() <= getAccess() ) ) return true; return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); }
Yep you need to change to PROTECTION_LEVEL@heba
im gettinng this error:
player.cpp: In member function 'virtual bool Player::canWalkthrough(const Creature*) const':
player.cpp:897:51: error: 'pROTECTION_LEVEL' is not a member of 'ConfigManager'
CXX protocolgame.o
make[1]: *** [player.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/otserver/trunk'
make: *** [all] Error 2
player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::pROTECTION_LEVEL)
player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL)