120 Commits

Author SHA1 Message Date
BeniS
b68df8336a Minor fixes to some previous commits.
* Fixed a bug with storing the protocol version.
* Fixed an issue with text windows cancelling.
* Fixed a typo in the source.
2013-01-18 03:23:01 +13:00
Eduardo Bart
0120b7554c Restore support for animated png files
* Rework resource manager
* Add missing files
* Improve some graphics classes
2013-01-08 19:31:41 -02:00
Eduardo Bart
b52c52cd36 Fix possible crashs when using server class 2013-01-08 18:05:24 -02:00
Eduardo Bart
122577a916 Just rename some files
* Fix a server ping issue
2013-01-08 16:32:05 -02:00
BeniS
44e428bccb Progress updating to cv981/pv973:
* Implemented the new client AND protocol version methods.
* Implemented the new speed laws added in cv980 (http://www.tibia.com/news/?subtopic=newsarchive&id=2251).
* Added more missing bytea to login packets (client version/type and some unknown bytes).
* Fixed the InputMessage::getDouble method.
* Cleaned up some of the const values.
* Started on the pending state features.

TODO:
* Pending game state feature.
* Ensure version compatibility hasn't been compromised.
2012-12-29 00:05:45 +13:00
BeniS
619285069c Started updating to 9.8+ features, not yet finished (unsafe version).
Need to finish:
* Pending login state
* New creature speed changes
* Vip state displays

Fixed:
* Creature light
* Missing lua constants

If someone can finish this off that would be good,
I will be busy for a while :)
2012-12-27 02:56:06 +13:00
Henrique Santiago
c517f7b745 Add/get table functions implemented on ext charlist 2012-08-30 02:59:27 -03:00
Henrique Santiago
05fcf740b4 Stats module 2012-08-22 05:51:31 -03:00
Henrique Santiago
7fb2f6deb5 Add getIp function, remove unused sql function 2012-08-12 01:54:45 -03:00
Henrique Santiago
fb7ab21e71 Move RSA class to Crypt 2012-08-04 10:54:35 -03:00
Henrique Santiago
4e0642c814 Removed GMP and added OpenSSL. Rsa class might be moved to Crypto later. 2012-08-03 13:02:01 -03:00
Henrique
3b345cf868 Add setXteaKey function 2012-08-01 21:25:11 -03:00
Henrique
4f0e00fdfa Change to RSA decrypt function 2012-08-01 15:34:42 -03:00
Eduardo Bart
3bac3dcbb4 Rework stdext classes
Implement new classes:
* stdext::any => ligher replacement for boost::any
* stdext::packed_any => like any but optimized to use less memory
* stdext::shared_object => ligher replacement for std::shared_ptr
* stdext::shared_object_ptr => replacement for boost::intrusive_ptr
* stdext::fast_storage => for storing dynamic data
* stdext::packed_storage => same but with less memory
* stdext::packed_vector => std::vector with less memory

Compiling should be a little faster now because global boost including
is not needed anymore
2012-08-01 09:23:35 -03:00
Henrique
3c1a5f24e8 Fix to protocolgame 2012-07-31 14:23:52 -03:00
Eduardo Bart
614d1544c0 Fix market reload and a crash when exiting 2012-07-31 11:42:26 -03:00
Eduardo Bart
a1fb373b1b Revert protocol bug added in lasts commit 2012-07-30 21:08:32 -03:00
Henrique
12e6602925 Bind connection and fix protocol recv without xtea 2012-07-30 17:12:38 -03:00
Henrique
c969f5209f Some changes to server compatibility 2012-07-30 16:40:03 -03:00
Eduardo Bart
03b8241bbc Rename stdext::shared_object_ptr to compile in gcc 4.6 2012-07-30 12:08:21 -03:00
Eduardo Bart
59b6abfa09 Implement message modes for 9.6
Fix possible crash when closing otclient
Fix private messages
Fix messages in 9.6
2012-07-30 09:33:52 -03:00
Eduardo Bart
e0431021b5 Huge engine change, replace all std::shared_ptrs
Create a new shared pointer type stdext::shared_object_ptr and stdext::shared_obj
using boost::intrusive_ptr

Advantages:
 * half memory usage
 * faster and lightweight

Disadvantages:
 * using weak_ptr is not supported anymore
 * compiling seems slower
2012-07-29 00:34:40 -03:00
Eduardo Bart
0a49f58e50 Fix crash when InputMessage is too large 2012-07-26 11:03:57 -03:00
Eduardo Bart
eb24d6776e Multi-protocol
Lots of chagnes to add multi protocol flexibility, not really
completed yet, still have to rework text messages opcodes and other stuff,
so this still a working in progress feature

* Rework dat reader, the dat reader can now
* dinamically detect dat version
* Split game into gamelib and game_interface
* Lots of other minor changes
2012-07-17 20:53:19 -03:00
BeniS
b7ac6ce6d5 Added Market/MarketProtocol module to begin the construction of the Market! Fixed some Minor Issues, and Some Cosmetics
* Added new protocol lib.
* Added missing Game Features to game/const.lua
* Added new Market module that will handle the market/market protocols too.
* Finished Market protocol and begun on the market structure (MarketOffer etc).
* Removed any traces of market protocol in the core (I think).
* Moved minimap images to /images.
* Removed old zoom images for minimap.
* Fixed a bug with randomize outfit.
2012-07-18 02:36:27 +12:00
Eduardo Bart
e3298d561c Rework application class and framework
Make otclient's framework flexible enough to run console apps like
servers, so this mean is possible to build otclient versions without
graphical interface and use it's framework to code servers
2012-07-13 22:23:11 -03:00
Eduardo Bart
e7691b873b Add error code to onError protocol event 2012-07-09 19:45:34 -03:00
Eduardo Bart
472e78d368 Make C++ exception works for lua
* Throw exception when open a file fails
2012-06-25 19:42:38 -03:00
Eduardo Bart
98a1b611bf Refactor for documentation 2012-06-25 19:19:17 -03:00
Eduardo Bart
4515e360e4 A lot of cmake changes, fix compile on win32 2012-06-22 16:04:03 -03:00
Eduardo Bart
139f389d88 fix infinite loop while saving empty minimap 2012-06-22 14:26:12 -03:00
Eduardo Bart
0c14a8e602 fix minor cmake issue 2012-06-22 13:02:16 -03:00
Eduardo Bart
aed779a2c8 doc and luabinder changes 2012-06-22 00:14:13 -03:00
Eduardo Bart
8761220deb Refactoring and flexibility changes
* Split game module into game and game_interface
* Move core_lib to corelib
* Move miniwindow to corelib
* Introduce init.lua script for initializing the client, giving much more flexibility
* OTClient is no longer Application derived and is much simpler
2012-06-19 21:16:52 -03:00
Eduardo Bart
1c7bbaea89 Fix memory leaks
* Fix recursive reference memory leak in UIWidget
* Make Event/ScheduledEvent memory-leak safe
* Fix exit crashs by freeing graphics resources before destroying GL context
* Add many asserts to avoid any leak regression
2012-06-18 05:13:52 -03:00
Eduardo Bart
ad04043a88 Lua binder compability changes
* A lot of changes in lua binder to compile with clang's libc++
* Add more portability to luabinder
* Remove const keyword from bound lua functions
* Deprecate std::bind usage with luabinder replace its usage with registerSingletonClass/bindSingletonFunction for binding singleton classes
* Fix a bug in lua binder where calling functions with bil object would make the client crash
* More fixes to compile with clang
2012-06-17 12:21:46 -03:00
Eduardo Bart
bb1fb939c4 just fixes
* fix battle rendering
* fix rendering glitch when following creatures
* properly throw exceptions from C++ to lua and avoid exception crashs
* fixes rendering states in framebuffer
2012-06-06 11:10:35 -03:00
Henrique Santiago
3cb5216858 protocol login working 2012-06-05 18:27:37 -03:00
Henrique Santiago
6b9943447a protocol login at lua 2012-06-05 16:16:57 -03:00
Eduardo Bart
e5000fa577 encrypt password and account number
* the encryption uses a unique machine key, this means that if anyone steals config.otml with a saved password,
he will not be able to decrypt the password without the machine UUID key
* the encrypt uses a simple XOR encryption method, encoded with base64 and adler32 summing
2012-06-04 09:38:25 -03:00
Eduardo Bart
14db1066fc change logger 2012-06-01 17:39:23 -03:00
Eduardo Bart
c01b32b032 rework log function and protocol
* remove some protocol ifdefs, replace with game features system
2012-05-28 19:04:44 -03:00
Eduardo Bart
4c80d783d6 rewrite and reoganize tools functions
* create stdext namespace which contains additional C++ algorithms
* organize stdext in string, math, cast and exception utilities
2012-05-28 10:06:26 -03:00
Eduardo Bart
946ec64e7f new protocol system fixes 2012-05-14 21:04:04 -03:00
Eduardo Bart
7bca3de8eb allow usage of network messages in extended opcode 2012-05-14 20:13:48 -03:00
Eduardo Bart
2478809945 add lua flexibility for protocol
* use shared_ptr for InputMessage and OutputMessage and bind them
* allow sending network messages from lua
* implement extended opcode
* use own OS type  for otclient to allow server side detection
* fixes in input event bot protection
* move RSA to input/output network messages
* allow to capture opcodes before GameProtocol parsing with the event GameProtocol.onOpcode
* fixes in lua std::string pop/push to allow byte buffering
2012-05-14 18:39:31 -03:00
Eduardo Bart
fa9c942471 basic protocol 953 support, logging in real tibia! 2012-05-12 01:52:16 -03:00
Eduardo Bart
5a47e9d8a9 support for protocol 810
* change in protocol/network classes to make compatible with older protocols
* use filestream for reading dat
* add many ifdefs for multi-protocol support
2012-05-11 15:02:57 -03:00
Eduardo Bart
02c5e7b8ff missing files
* add questlog icon
* add playertrade otui
* some protocol changes for extended messages
2012-05-01 21:41:42 -03:00
Eduardo Bart
cb7bd521d2 fix compilation on win32 2012-04-13 21:14:25 -03:00