Fix/Patch [Source] Downgrading TFS from 8.1 to 8.0

elf

Sing, sing blue silver
Joined
Dec 11, 2007
Messages
3,665
Reaction score
107
Location
Cracow, Poland
Many people just don't want to upgrade their servers (at least yet) to 8.1.
I guess it is caused by need of (almost) map remake (if they have their own), and the current features provided by OpenTibia-based servers aren't worth to work 2 days to fix at least 50% of tiles (well, thats my case :D) on map.
All of us want to bring the best to our players, so bug fixes provided by SVN revisions are required.
Now, when TFS became a 8.1, its impossible to have both at one time without some source code edition.
Im writing this small tutorial mostly for newbies, but remember, one day You were also a beginer, so don't comment it like I would kill Your mother.
Everything You have to edit are 3 files and it takes not longer than 3 minutes. Its very easy so far - so, lets begin.

IMPORTANT! You need to have also a non-8.1 items.otb (Dowonload here)

1. Open items.cpp, and find (line 191):
Code:
	else if(Items::dwMinorVersion < CLIENT_VERSION_810){
Replace it with:
Code:
	else if(Items::dwMinorVersion < CLIENT_VERSION_800){
Save and close the file.

2. Open protocolgame.cpp, and find (line 487):
Code:
	if(version < 810)
	{
		disconnectClient(0x0A, "Only clients with protocol 8.1 allowed!");
		return false;
	}
Replace it with:
Code:
	if(version != 800)
	{
		disconnectClient(0x0A, "Only clients with protocol 8.0 allowed!");
		return false;
	}
Save and close the file.

3. Open protocollogin.cpp, and find (line 94):
Code:
	if(version < 810)
	{
		disconnectClient(0x0A, "Only clients with protocol 8.1 allowed!");
		return false;
	}
Replace it with:
Code:
	if(version != 800)
	{
		disconnectClient(0x0A, "Only clients with protocol 8.0 allowed!");
		return false;
	}
Save and close the file.

Thats all, now You may compile the core :)


P.S. I know (because I have checked the difference of almost all new files to their last rev :D) there were done many changes not only in these files, but I tested it so far, and didnt find any bug yet (I was mostly afraid of earth damage instead of poison one, but it seem to be working fine).
 
Last edited:

KaczooH

Co tu wpisac?
Joined
Oct 12, 2007
Messages
904
Reaction score
0
Looks great :) But I think that we shouldn't use the latest revisions though , since there are often buged a bit, on our OTS.
 
OP
elf

elf

Sing, sing blue silver
Joined
Dec 11, 2007
Messages
3,665
Reaction score
107
Location
Cracow, Poland
Imho the current revision (474), which is unluckly made for 8.1 client, is most stable one.
Evermore lots of annoying bugs were fixed, so thats why I wrote this little tutorial.
 

KaczooH

Co tu wpisac?
Joined
Oct 12, 2007
Messages
904
Reaction score
0
I havn't tried it yet but I'm able to belive you. :)
But it's nice tutorial though - clean and easy to understand :)

offtop - who knows what happens to the house owner if he's pacc is finished?
 

KaczooH

Co tu wpisac?
Joined
Oct 12, 2007
Messages
904
Reaction score
0
Tested and works nice :) Great job :)

Offtop - slawkens (thanks) said that the accout type (premium or not) is checked propably only when player is buying house.
 

psilocibe

Excellent OT User
Joined
Jul 9, 2007
Messages
473
Reaction score
8
incredible i am testing this is very rox solution for my problem!
Nice job FightingElf
 

KaczooH

Co tu wpisac?
Joined
Oct 12, 2007
Messages
904
Reaction score
0
I guess he may join tfs coding team soon :> In 2 days he made 2 (or maybe more) tutorials with his own solutions. It's nice to see people like you =)
 
OP
elf

elf

Sing, sing blue silver
Joined
Dec 11, 2007
Messages
3,665
Reaction score
107
Location
Cracow, Poland
Nothing special, I'm just sharing my work :)
 

KaczooH

Co tu wpisac?
Joined
Oct 12, 2007
Messages
904
Reaction score
0

Yony

New Member
Joined
Sep 7, 2007
Messages
318
Reaction score
0
Location
Israel
and if i want to make it version 1.0? :p
what i have to do? same steps?
 

Cosmotonio

New Member
Joined
Nov 26, 2007
Messages
142
Reaction score
0
version 1.0 do not exist.
the first online version of tibia is 5.11, i think.
 

KaczooH

Co tu wpisac?
Joined
Oct 12, 2007
Messages
904
Reaction score
0
But I think that he mean his own client. I think that the same steps but the client must be edited too to send to server info that its version is 1.0
 

Maly Wizak

Member
Joined
Oct 5, 2008
Messages
33
Reaction score
0
I know you like to compile another version of the engine. I wanted to compile the trunk of 8.2 and there is no in items.cpp is from 820 to 810 and change, but protocolgame.cpp protocollogin.cpp and there is nothing that this protocol at 8.2 -.- why?
 

Santi

Theres no way im stopping
Joined
Aug 29, 2010
Messages
1,975
Reaction score
149
Location
00
This gotta be one of the biggest bumps out there.
 
Top