Commit Graph

655 Commits

Author SHA1 Message Date
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
BeniS 6c281a828c Market fixes for creating offers, got Tibia working properly with market, fixes to statistics. 2012-07-29 01:41:10 +12:00
Eduardo Bart 20314de00a Fix corelib tr 2012-07-28 02:29:26 -03:00
Eduardo Bart d85dd3e20f Normalize source code
Add .gitattributes
Remove trailing whitespaces
2012-07-28 02:07:57 -03:00
BeniS 7aba117cf2 More market work (getting close to completion)
* Can now create market offers with fully working UI.
* All filtering is now completed (just need to finish word searching).
* Added some user friendly features to offer selections and item displays (show amount in depot).
* Some more UI ascetics.
* Some other minor market fixes.

TODO:
* Finishing applying changes for latest module updates by edubart.
* Finish buying/selling existing offers.
* Word searching items.
* Offer management.
* Full cipsoft tibia testing.
2012-07-27 15:53:42 +12:00
Eduardo Bart 2b2f5b33ff Fix hidden npc messages 2012-07-26 20:36:51 -03:00
Eduardo Bart 964c73a6ad Debug unknown message modes
Fix broadcast message mode
2012-07-26 19:32:23 -03:00
Eduardo Bart d2b85bdba8 More modules fixes 2012-07-26 19:13:47 -03:00
Eduardo Bart 9ad9d88e10 Fix npc trade and npc chat 2012-07-26 12:42:15 -03:00
Eduardo Bart 0a49f58e50 Fix crash when InputMessage is too large 2012-07-26 11:03:57 -03:00
Eduardo Bart 0eb7c166c0 Fix console blue messages 2012-07-26 09:19:30 -03:00
Eduardo Bart 657640c270 Mounts
Show creature mounts
Fix outfit window
Fix some 9.6 protocol issues
2012-07-26 09:19:30 -03:00
BeniS 5419eece66 Some minor fixes
* UISpinBox bug with minimum/maximum
* Some fixes to UITable
* Fixed force exit bug.
* Added new next/previous ui buttons.
2012-07-26 22:22:53 +12:00
Eduardo Bart 36c029fc69 Multiprotocol 8.1-9.6 finally working
Still have many minor issues, tests are needed
No recompilation needed anymore
9.60 messages is not fully implemented
2012-07-26 06:12:20 -03:00
Eduardo Bart c795eb91ab More multiprotocol support 2012-07-26 03:10:28 -03:00
niczkx e393bc245d BeniS made tests, loop is faster. 2012-07-24 17:02:56 -06:00
niczkx 45d55b63d9 typo 2012-07-24 14:00:38 -06:00
niczkx 1e2af86d16 http://lua-users.org/wiki/StringsTutorial learn plz *facepalm* 2012-07-24 13:49:19 -06:00
Eduardo Bart bb52608cda Fixes for last commit 2012-07-24 02:41:59 -03:00
Eduardo Bart c54cd1fdf1 Use new coding style in game modules
Lots of refactoring and changes
Remove docs folder
2012-07-24 02:30:08 -03:00
Eduardo Bart 1c3e630237 Improve modules and sandbox system 2012-07-23 21:22:38 -03:00
BeniS 19dd96fd02 Market item filtering improvements and other some minor improvements
* Can now filter market items by vocation, level, slot type, and depot items.
* Added new bitwise lib for handling flag operations.
* Can now get/set local player vocation/premium (TODO: spell list).
2012-07-24 03:11:53 +12:00
Eduardo Bart dc8ef845ab Warn redefined key bindings 2012-07-23 01:44:15 -03:00
BeniS bacb324f9e Work on the Market Interface (feel free to test it out so far, can't purchase items through the UI yet), More on UITable (needs work on headers still).
* Tables can now have headers (the layouts will require some more work before read to be used formally).
* Finished Market offers display, Item details display, and Item statistics display.
* Added getSelectedWidget to UIRadioGroup class.

Market TODO:
* Create buy/sell offer.
* Purchase sale offer or accept purchase offer.
* More item filtering features (weapons, types, depot only, vocation, etc).
* Item searching feature.
* View your offers (history/current).
* UI touch ups and optimizations.
2012-07-23 02:02:01 +12:00
BeniS 76c7bf45bd More on UITable and the Market. 2012-07-22 05:17:03 +12:00
BeniS 9c8134c8a6 Some performance fixes, added UITable widget for easy tables (needs more work still), Worked on Market order displaying. 2012-07-22 00:15:29 +12:00
niczkx 8a49d09b75 stop using pairs instead of index loops, please, it's so much slower 2012-07-20 20:56:08 +02:00
BeniS 483487ab09 More work on Market functionality and UI
* Now loads all market items.
* Can filter market items.
* Will load market offers on items.
* Edited some UI images.
2012-07-21 06:20:06 +12:00
Eduardo Bart 09b4705a33 Fixes errors in textmessage 2012-07-19 16:47:55 -03:00
BeniS 6293a49f8f More on Market (far from done), Minor Fixes, Edited Outfits Module, Some Cosmetics.
* Started building the market UI.
* More work on the market functionality.
* Fixes to the market protocol. (Known issue: if I use safeSend method from Market (like so: MarketProtocol.send~) is thinks it is a bot).
* Fixes to the market offer class.
* Outfit window will no longer display the mount box if you are using protocol < 870.
* Added getFeature to playermount module.
* Added isMarketable and getMarketData to the lua binding.
* Added lua casts for MarketData.
* Fixed typo in the module manager.
* Added new 'light flat panel' for more variation (can change later) will require some graphics for market.
* Added new functions to table lib.
* Fixed some styling issues from previous commits.
2012-07-20 06:54:24 +12:00
Eduardo Bart f289db3a9e Module sandboxing system
Sandboxing makes module scripts run inside an isolated lua environments,
making more easier and secure to script

Move and rework TextMessage using the new sandbox system
2012-07-19 06:15:23 -03:00
Eduardo Bart b0e6b3b8fb Update item OTBM attributes reader
* Fix some lua errors generated by playMusic
* Fix possible crash when starting otcliet without dat loaded
2012-07-18 05:34:17 -03:00
Eduardo Bart 7cd49712f8 Add missing file 2012-07-18 04:49:44 -03:00
Eduardo Bart cf9f57736f More multiprotocol progress 2012-07-18 03:04: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 6fc11d2fa9 Forgot to make private functions local. 2012-07-18 11:31:32 +12: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 59fc3d5f77 Rename 'addons' folder to 'mods' to avoid
Use onRun event to play startup music
2012-07-16 20:07:42 -03:00
Eduardo Bart bc81c9c8bf Packages system with .otpkg files
When otclient initializes it tries to find all .otpkg files inside the
current search paths (./ ./modules ./addons) and then add them
to the front of current search paths. This way .otpkg can contains
many modules/addons and modifications in a single file that otclient
can recognize.

otpkg files can be compressed files supported by PhysFS, which
are ZIP (.zip) and LZMA (.7z).
2012-07-16 16:35:14 -03:00
BeniS 09425eba31 Fixed crash issue with outfit window with protocols <= 860 2012-07-17 02:39:08 +12:00
BeniS f73b3bbece Fix for Issue #41 2012-07-17 00:21:34 +12:00
BeniS 92e3c2cbd6 Fixes to mounting, outfit randomizing, and added creature getSpeed to the lua binding. 2012-07-16 11:08:27 +12:00
Eduardo Bart f47a947bf3 Fixes for last commits 2012-07-15 11:29:05 -03:00
BeniS 5520501673 Implemented the mount interface, Fixed some interface stuff, Some cosmetics, and Updated the outfits window
* Added new arrow buttons.
* Fixed the vertical separator.
* Added new game_playermount module to handle player mounting.
* Moved the battle icons to /images.
* Outfit window accommodates for mounts, loads addons more efficiently and keeps addons set on update, added new Outfit.randomize function that allows you to randomize your outfit colors, and set up a new layout.
2012-07-15 23:49:28 +12:00
Eduardo Bart ec5106e7ce Fix skin texture caching 2012-07-14 18:30:00 -03:00
Eduardo Bart 70115e391d Merge fallen changes 2012-07-14 14:22:18 -03:00
BeniS 694a69e1bf Changed/Fixed Text Windows, Text Message, Hotkeys Manager, Game Interface and Quest Log
* Renamed game_textbooks to game_textwindow.
* Fixed text window from opening multiple times, and is destroyed correctly.
* Added new game_playerdeath module (moved death message and window here).
* Hotkey window will hide on game end.
* Logout/Exit/Stackable Items/Questlog/Hotkeys windows will now close on game end.
2012-07-14 22:59:32 +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
BeniS 810816b4a3 Changes/Fixes to Character List, Hotkey Manager, Exit Window and Text Message.
*Fixed typo in character list string.
* Hotkey text edit will now focus when you select a list item.
* Fix to the exit window layout.
* Added a death window for player deaths.
2012-07-13 20:24:52 +12:00
BeniS 3ebb997c37 Fixed/Changed Minimap and Game Interface Window Issue.
* Changed minimap navigation to hold right click.
* Added MAX_FLOOR_UP and MAX_FLOOR_DOWN for floor changing in the minimap.
* Fixed issues with exit window, logout window and count window to stop multiple instances of the window.
2012-07-13 18:31:05 +12:00
Eduardo Bart 9bfd2617e9 Fix some lua errors 2012-07-12 22:26:08 -03:00
Eduardo Bart e8abf56b28 Change inventory items order
Update miniwindow buttons image
2012-07-12 22:04:16 -03:00
Eduardo Bart ebc88b8354 Tweak modules interface
Minimize miniwindows space usage
Implement easier minimap navigation
Redesign inventory, minimap and healthinfo layout
2012-07-12 20:40:55 -03:00
Eduardo Bart c0c2411854 Improve minimap 2012-07-12 16:16:23 -03:00
BeniS 935ca87d16 Few minor fixes from previous commit. 2012-07-13 05:29:44 +12:00
BeniS 8850528091 Updated Top Menu, Health Info, Combat Controls, Console (Channels), Game Toggle Buttons, Minimap Layout, Game Interface Prompts, and Creature Draw Info.
* Added new left and right game button panels.
* Relocated main game toggle buttons to the right side of the screen to make it easier to toggle miniwindows.
* Added table.empty(t) function to table lib.
* Renamed module game_healthbar to game_healthinfo.
* Combat controls now save per character (e.g. Fight mode, chase mode, safe fight mode)
* Last channels open now save per character.
* Fixed typo in containers.lua.
* Added logout prompting window message when you logout via the logout button.
* Added exit promting window message when you attempt to exit the client.
* Repositioned some minimap buttons.
* Fixed so when creatures health percent is < 1 it will not draw the creature information.

Known Issues:
* If you move a container widget into the map rect if you move an item onto itself it will allow this to execute still dropping the item on the ground.
* The server is calling to open channels after onGameStart is executed causing it to focus the last tab opened. Fix: Don't save channels to the settings that are opened by the server.
2012-07-13 04:45:22 +12:00
Kamil 8f492f7e06 Fixed bug with adding Vip from console or map, who is already on viplist. 2012-07-12 13:21:51 +02:00
Kamil de873448b5 Updated. 2012-07-11 05:43:33 -03:00
Kamil 4aeb9edfae Reopen last channels on login. 2012-07-11 05:43:33 -03:00
kilouco 104785818b Now Soul Points are shown in the bottom of the HealthBar widget. 2012-07-11 00:47:53 -03:00
Eduardo Bart d39ca7de10 Restore periodicalEvent function
* and typo fixes
2012-07-10 14:36:18 -03:00
Eduardo Bart 351115d9d9 Fix login error message 2012-07-10 09:32:13 -03:00
BeniS 54e061f2f7 Minor fix in the hotkeys from previous commit. 2012-07-11 00:27:29 +12:00
BeniS 82233dc655 Changes/Fixes to Channels/Hotkeys/Inventory Slots.
- Fixed issue with opening multiple instances of the same message channels (will focus the channel if already exists).
- Added tooltip to the 'Clear message window' button.
- Added keyboard Up/Down press for hotkeys.
- Added inventory slots/images.
- Started on adding soul
2012-07-11 00:15:31 +12:00
Eduardo Bart e7691b873b Add error code to onError protocol event 2012-07-09 19:45:34 -03:00
Eduardo Bart 59f75d996e Fix crash when logging without specifing a port or host 2012-07-09 15:06:58 -03:00
Eduardo Bart 2c5fdc88d1 restore music at startup 2012-07-09 14:53:05 -03:00
Eduardo Bart 23fee49456 Merge pull request #6 from sn4ke/master
Fixed bug with adding Vip from console or map, who is already on viplist.
2012-07-09 09:19:23 -03:00
BeniS 902ce06e88 Fixed an issue with the battle list filter.
More work on the minimap, interface changes, fixed direction controls, fixed reseting, fixed some draw things (needs some more work to finish).
Fixed a bug in the battle list causing Battle.onFollow(creature) to execute when there was no follow.
2012-07-09 09:19:02 -03:00
Kamil 85786efbd3 Fixed bug with adding Vip from console or map, who is already on viplist. 2012-07-09 08:59:16 +02:00
Eduardo Bart 4ac3ec8344 Minor fixes for releasing otclient 2012-07-08 13:46:09 -03:00
Eduardo Bart 7e96c3bec6 Disable particles module 2012-07-08 10:38:01 -03:00
Eduardo Bart c05a7f6403 Add clear channel icon 2012-07-08 10:21:12 -03:00
Kamil f533e739c9 Added clear button to game console (in commit I didn't add icon). 2012-07-08 11:50:24 +02:00
BeniS 69cc53d7f3 Minor fix from last commit. 2012-07-08 02:44:53 +12:00
BeniS 4453242bee Adjusted chase modes to work correctly, added new option for auto chase override. Fixed NPC speak messages to appear in the correct position. 2012-07-08 02:09:50 +12:00
Henrique Santiago 6a85c31a77 Some particle stuff, far from done 2012-07-06 02:01:13 -03:00
Eduardo Bart 6f12261aef Move otclientrc.lua to top dir
* Use markdown for README
2012-07-05 17:03:57 -03:00
Eduardo Bart 8cc14c2d2d Save graphics options 2012-07-05 15:49:10 -03:00
Eduardo Bart 6bce0bd680 Imrove lua engine
* Allow bound C++ functions to return multiples values to lua with tuples
2012-07-05 09:38:48 -03:00
Henrique Santiago 0b98dca50f Changes to autowalk position on different floors, move its functions to game interface 2012-07-05 02:40:31 -03:00
Henrique Santiago df8dd52c25 Changes to npc trade module 2012-07-04 17:36:58 -03:00
Henrique Santiago 46e3fbe045 Resize background image to 1024, so it'll be loadeable in old hardware 2012-07-03 12:43:13 -03:00
AndreFaramir 0005119afe improving minimap 2012-06-26 02:55:33 -03:00
Eduardo Bart 98a1b611bf Refactor for documentation 2012-06-25 19:19:17 -03:00
Henrique Santiago 39403e612f Fixes to miniwindows 2012-06-24 09:41:50 -03:00
Eduardo Bart eec6114b2d Optimize lua object push
* Optimize position hash
* Fix minimap reload
2012-06-24 08:20:39 -03:00
Eduardo Bart fcd6d3cfe9 Minimap fixes
* Fix infinite loop while loading minimap
* Fix errors in FileStream class
* Remake OTCM map format
* Fixes in UIMap
2012-06-23 12:03:28 -03:00
Eduardo Bart d39cf361ab improve minimap 2012-06-22 02:26:22 -03:00
Eduardo Bart aed779a2c8 doc and luabinder changes 2012-06-22 00:14:13 -03:00
Eduardo Bart c5674d10ba some refactoring 2012-06-21 20:58:18 -03:00
Henrique Santiago a7c17cec2e Save miniwindows states 2012-06-21 16:31:36 -03:00
Eduardo Bart 96c363d997 changes for otb compability 2012-06-21 14:54:20 -03:00
Henrique 857657d8a0 Fix popupmenu style, exitting on game 2012-06-20 04:10:12 -03:00
Henrique db4ced65eb Fix skin and locale at first run, adding new locale to combobox, exit function double call, enable sound option 2012-06-20 03:31:52 -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
Henrique Santiago 4bdcae2f8b improvements to skins 2012-06-19 05:46:49 -03:00
Eduardo Bart 5a048eb7ea Minor graphics fixes 2012-06-18 20:58:56 -03:00
Henrique Santiago 2d04d41f09 skins, not fully working 2012-06-18 04:47:35 -03:00
Eduardo Bart 4813b7eb4b many changes
* Fixes in WIN32 platform
* Remove unused files
* Make StaticText work more like tibia
* Fix WIN32 compilation
* Fix regression in framebuffers that caused battle to disappear
* Shader fixes for DX9
* Add two new shaders: noise and heat
2012-06-15 21:46:36 -03:00