• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

No mana spent in Protection Zone

Demonder

New Member
Joined
May 22, 2009
Messages
8
Reaction score
0
Hello guys.
I'm in doubt if it is possible.
I use a server 8.57 (TFS 0.3.6) and i wanna know if is possible to make players do not gain mana spent when use any spell in Protection Zone, buy only out of the same.
Could someone give me an idea where to start? or if possible make a simple example?

Thanks
Att Demonder
 
spells.cpp
Code:
void Spell::postCastSpell(Player* player, uint32_t manaCost, uint32_t soulCost) const
{
	if(manaCost > 0)
	{
		player->changeMana(-(int32_t)manaCost);
		if(!player->hasFlag(PlayerFlag_NotGainMana) [B][COLOR="red"]&& player->getZone() != ZONE_PROTECTION[/COLOR][/B] && (player->getZone() != ZONE_PVP
			|| g_config.getBool(ConfigManager::PVPZONE_ADDMANASPENT)))
			player->addManaSpent(manaCost);
	}

	if(soulCost > 0)
		player->changeSoul(-(int32_t)soulCost);
}
 
Back
Top