• 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!

Fix/Patch Night on TFS 1.1 .. HELP? Please look this .

rexgandi

Member
Joined
Oct 22, 2011
Messages
189
Reaction score
9
Hello !
Who's can compiling tfs 1.1, when in game be all time NIGHT...
I don't remember this line , but must edit one value 80 >>> 1 ..
Help please.
I now... English ;x
 
game.cpp

change this:
Code:
    lightLevel = LIGHT_LEVEL_DAY;
    lightState = LIGHT_STATE_DAY;

to:
Code:
    lightLevel = LIGHT_LEVEL_NIGHT;
    lightState = LIGHT_STATE_NIGHT;


change this:
Code:
void Game::start(ServiceManager* manager)
{
    serviceManager = manager;

    g_scheduler.addEvent(createSchedulerTask(EVENT_LIGHTINTERVAL, std::bind(&Game::checkLight, this)));
    g_scheduler.addEvent(createSchedulerTask(EVENT_CREATURE_THINK_INTERVAL, std::bind(&Game::checkCreatures, this, 0)));
    g_scheduler.addEvent(createSchedulerTask(EVENT_DECAYINTERVAL, std::bind(&Game::checkDecay, this)));
}

to:
Code:
void Game::start(ServiceManager* manager)
{
    serviceManager = manager;

        g_scheduler.addEvent(createSchedulerTask(EVENT_CREATURE_THINK_INTERVAL, std::bind(&Game::checkCreatures, this, 0)));
    g_scheduler.addEvent(createSchedulerTask(EVENT_DECAYINTERVAL, std::bind(&Game::checkDecay, this)));
}

me adiciona no skype se precisa de mais coisas
 
This works, however, I need to remove the admin Full light. How can I do this? I have tried to edit flags, with no luck, before it is suggested.
 
Code:
void ProtocolGame::AddCreatureLight(NetworkMessage& msg, const Creature* creature)
{
    LightInfo lightInfo;
    creature->getCreatureLight(lightInfo);

    msg.addByte(0x8D);
    msg.add<uint32_t>(creature->getID());
    msg.addByte((player->isAccessPlayer() ? 0xFF : lightInfo.level));
    msg.addByte(lightInfo.color);
}

change to this:

Code:
void ProtocolGame::AddCreatureLight(NetworkMessage& msg, const Creature* creature)
{
    LightInfo lightInfo;
    creature->getCreatureLight(lightInfo);

    msg.addByte(0x8D);
    msg.addByte(lightInfo.level);
    msg.addByte(lightInfo.color);
}

like if I helped

(edited)
 
Last edited:
This worked, thanks.

Code:
void ProtocolGame::AddWorldLight(NetworkMessage& msg, const LightInfo& lightInfo)
{
    msg.addByte(0x82);
    msg.addByte(lightInfo.level);
    msg.addByte(lightInfo.color);
}
 
Back
Top