Commit Graph

335 Commits

Author SHA1 Message Date
Henrique Santiago b7b8fdfd0c Fix BinaryTree skip, small otb changes 2014-02-13 00:42:06 -02:00
Eduardo Bart 57a330e589 Fix path finding issue introduced by PR #470 2014-02-11 19:28:01 -02:00
sakagushi f0fbd4790f And do not delete curly brackets. 2014-02-06 04:36:39 -02:00
sakagushi cb1f28a3a3 Meh, spacing. 2014-02-06 04:34:54 -02:00
sakagushi cc1e3c534e Even more fixes
Forgot to clean the garbage generated in the last commit.
2014-02-06 04:34:04 -02:00
sakagushi f4f79f47bd Optimizations in Map::findPath 2014-02-06 03:57:17 -02:00
sakagushi ff617c3fab More fixes in Map::findPath
Fixed the styling, std::unique and removed the priority_queue comment
2014-02-06 03:36:19 -02:00
sakagushi 43524a9127 Fixes heap corruption in Map::findPath 2014-02-06 02:08:10 -02:00
Sam 48ff67dc06 Fix useWith issue 2014-01-25 22:14:01 +01:00
Sam 8bd154b604 Merge pull request #452 from conde2/master
Temporary fix for async
2014-01-24 10:26:28 -08:00
conde2 9da018fdff Temporary fix for async
This should be fixed in server side, until that we just don't need to
use.
2014-01-24 00:19:08 -02:00
Sam 4f4788c1c3 Fix WritableDate to correct version (at least I hope so), fixes #446 2014-01-21 23:13:07 +01:00
Sam d0d8c9a081 Bind adjustments, some fixes 2014-01-21 22:12:50 +01:00
Henrique Santiago f3b5adbf40 Merge pull request #447 from conde2/master
Fix compilation under MSVC, bind some fucntions
2014-01-21 13:01:56 -08:00
Sam 38c9b6b0b2 Luacasts for Light 2014-01-21 22:01:11 +01:00
conde2 79be0eca73 Fix compilation under MSVC, bind some fucntions 2014-01-21 18:33:22 -02:00
Sam 9bd02ca8ba Added method to export a ThingType as png :exportImage(fileName) 2014-01-21 12:11:19 +01:00
Sam f12ecd8404 Implemented a function to save .dat file 2014-01-21 11:10:02 +01:00
Sam 53803b2218 Implemented a function to save .spr file 2014-01-20 23:51:15 +01:00
Sam 455000c02d Fix save_png definition / New UISprite function 2014-01-20 22:48:50 +01:00
Sam 27ae54d7d6 Lua call for loading .spr, .dat, .otb 2014-01-18 18:38:13 +01:00
Sam aec577a4b4 Merge pull request #442 from d33tah/master
Get rid of trailing whitespace.
2014-01-18 08:11:03 -08:00
Ahmed Samy 6f467d5a1b Sort town/house names 2014-01-18 17:57:42 +02:00
Jacek Wielemborek e6c9e78935 Get rid of trailing whitespace.
Commit generated by command:

find -type f ! -path '*.git*' ! -path '*.png' ! -path '*.ico' ! -path \
    '*.ogg' | xargs -I '{}' sed -i '{}' -e 's/\t*$//g' -e 's/ *$//g'
2014-01-18 15:09:26 +01:00
Sam 3750a85c5f Fix for version 8.40 2014-01-17 22:41:58 +01:00
Sam 03de13d618 Duplicate lua function removed 2014-01-16 22:11:42 +01:00
Sam 20b68c6a42 Vip functionality, closes #83 2014-01-14 23:15:01 +01:00
Ahmed Samy e4ba805e00 deleteSpawn() 2014-01-14 11:04:48 +02:00
Ahmed Samy 93be0f975f getCreatures / getSpawns 2014-01-14 01:47:43 +02:00
Sam cbfeef39bc Effects now use x and y pattern, fixes #433 2014-01-13 16:03:42 +01:00
Sam d7dfa2220e GMAction fix 2014-01-08 17:25:05 +01:00
Ahmed Samy edf17a44ca Code cleanup 2014-01-06 14:35:57 +02:00
Sam 6db2458c1d Adding 10.31 to version list 2014-01-01 15:47:51 +01:00
Ahmed Samy 2556bfcbf2 Tab -> space 2013-12-30 18:13:49 +02:00
Ahmed Samy 9bdce800d8 Bind Container item code to lua 2013-12-30 18:10:45 +02:00
Ahmed Samy 9adab5f9bf Item serialization: Write description & text 2013-12-27 12:59:50 +02:00
Ahmed Samy a6f998d406 Fix typo & bind ItemType::isWritable 2013-12-27 11:32:19 +02:00
Ahmed Samy ab21558c47 Do not test for TILESTATE_NONE
This flag is ALWAYS set, cause it's always 0 i put there by mistake.
It causes an issue by simplying drawing everything dark, cause of
the opacity...
2013-12-27 05:10:00 +02:00
Sam 17c4d59b15 Enabling versions 7.8 to 8.0 2013-12-26 23:20:34 +01:00
Sam da959aca28 Support for protocol 7.7/7.72 / Tiny fix 2013-12-26 21:31:55 +01:00
Sam 27db78567b Fix writables in 7.6, fixes #416 2013-12-25 15:11:12 +01:00
Sam 9d8cf33acc Fix 7.60 login protocol 2013-12-23 23:45:49 +01:00
LordHepipud aa84ee4362 Fix 7.70 RSA / XTEA encryption
RSA / XTEA encryption was implemented with Client 7.70

~~~~Lord Hepipud~~~~
2013-12-23 23:31:59 +01:00
Henrique Santiago 1e17919a26 Use of createTable on containers 2013-12-22 17:36:43 -02:00
Ahmed Samy 24e26e190b Also unbind g_minimap.updateTile 2013-12-18 04:40:53 +02:00
Ahmed Samy ad7cda534d Fix minimap tile update for item removal 2013-12-18 04:40:52 +02:00
Ahmed Samy 22f97aa00b More binds to lua 2013-12-15 04:59:45 +02:00
Ahmed Samy e32607b05c Tiny fixes 2013-12-15 04:33:43 +02:00
Ahmed Samy 1790eee1c6 Add selection to tile 2013-12-14 23:06:52 +02:00
Ahmed Samy ec2518525a Add more tile flags to be checked for 2013-12-14 19:44:54 +02:00
Ahmed Samy eb4fb4ff41 Animations are now optional
The default behaviour is still there though.
2013-12-14 18:48:18 +02:00
Ahmed Samy 4f997a3826 Only request tile cache to be updated once for both x & y 2013-12-12 16:24:50 +02:00
Ahmed Samy c54015a60d Fixup movePixels a little bit
Thanks to @dalkon for dis.
2013-12-12 16:21:22 +02:00
Ahmed Samy 57c432d3ea Increase maximum move offset to be 64 instead of 32 2013-12-12 03:23:13 +02:00
Ahmed Samy bd8c883e13 Take out debug message 2013-12-12 02:53:57 +02:00
Ahmed Samy b5c3b37b3c Tiny fix for movePixels 2013-12-12 02:46:20 +02:00
Ahmed Samy ece6507df2 Bind g_minimap.updateTile to lua
This is needed to update tile removals from minimap widget.
2013-12-11 19:08:12 +02:00
Ahmed Samy 04515ffbb8 Fix map move pixels function
Thanks to @dalkon for this.
2013-12-11 18:36:31 +02:00
Ahmed Samy ed24a0735a Bind {un,}lockVisibleFloor to lua 2013-12-09 20:15:39 +02:00
Ahmed Samy 2498129ff3 mapio: don't add saved with line in description 2013-12-07 02:52:51 +02:00
Ahmed Samy 066638e7c0 mapio: don't add description twice 2013-12-07 02:27:21 +02:00
Ahmed Samy 95610de5f3 bind set{Width,Height} of g_map to lua 2013-12-07 02:00:31 +02:00
Ahmed Samy 9154c0a678 mapio: fix load on new maps 2013-12-06 23:08:08 +02:00
Ahmed Samy 772ec208c0 don't throw error on fail 2013-12-05 22:23:46 +02:00
Sam 99500c9c91 Protocol 8.40-.42 fixes, closes #272 2013-12-04 16:02:51 +01:00
Ahmed Samy b9b9a32b83 Spawns: add function to find a spawn to place a creature on 2013-12-04 14:30:26 +02:00
conde2 d7612e9304 Little mistake 2013-12-01 01:12:06 -02:00
conde2 4dcb30110f Use of clamp 2013-12-01 00:48:36 -02:00
conde2 ca2fe9cf45 Fix compilation under MSVC
Use template for std::min and std::max
2013-11-30 23:08:43 -02:00
Sam ec012cb137 Fix 7.6 protocol issue / Typo 2013-11-19 01:09:31 +01:00
Sam 69ae324676 Tiny setPVPMode fix 2013-11-19 00:55:42 +01:00
Sam 4d656f8bd1 New pvp modes to combat controls 2013-11-19 00:50:00 +01:00
Sam c98439ae65 onOutfitChange fix 2013-11-18 23:18:48 +01:00
Sam 4f9f04206d Added enter / escape button to minimap flag window 2013-11-18 20:57:50 +01:00
Sam fc54a6e418 Full modal dialog functionality 2013-11-18 18:58:15 +01:00
Ahmed Samy 25d3019d1a force use of template version of std::min/max 2013-11-14 00:02:47 +02:00
Ahmed Samy 1711d8bdaf Revert "replace all std::min/std::max with just min/max"
This reverts commit 28d967ccce.
2013-11-13 23:53:54 +02:00
Ahmed Samy 28d967ccce replace all std::min/std::max with just min/max
This errors out in MSVC since the inclusion of winsock2.h, CL uses the
macro not the template version.
2013-11-13 23:48:10 +02:00
BrunoDCC 4bfe9b640e Fix houses and monsters 2013-11-13 18:48:37 -02:00
Eduardo Bart dd829395e3 Merge pull request #376 from dalkon/master
Item phases & Fix party "bug" & Additions
2013-11-12 15:56:54 -08:00
dalkon 18fa54181a Format fix 2013-11-13 00:50:46 +01:00
dalkon 5b8ff29fa3 Fix party "bug" & Additions 2013-11-13 00:48:41 +01:00
dalkon 59e90e8f1e Item phases 2013-11-13 00:18:15 +01:00
Eduardo Bart fc0297d6db Fix compile errors in ubuntu 2013-11-12 20:07:46 -02:00
Eduardo Bart 1060c6f78c Compilation for MSVC2013, thanks @dalkon
OTclient now compiles in "Microsoft Visual Studio 2013 Express for Windows Desktop"
All the needed libraries you can download at https://www.dropbox.com/s/2yfb1c763io8efy/otclient-msvc13-libs.zip
NOTE: You have to change VC++ Directories to the properly directories
NOTE: Latested MSVC 2013 or greated is required
2013-11-12 16:32:39 -02:00
dalkon c9597d6682 Visual Studio 2013 Compatibility 2013-11-12 16:32:39 -02:00
Ahmed Samy 2b015d49d7 don't set bits twice 2013-11-12 20:06:59 +02:00
Ahmed Samy f04b4a0b42 small fix 2013-11-12 20:02:24 +02:00
Ahmed Samy ff5c22d4c0 Tiny fix
Saving newly made houses by the map editor is not even supported, so this
is not a bug
2013-11-12 17:15:09 +02:00
Eduardo Bart 1868b235cb Implement creature marks 2013-11-11 01:45:18 -02:00
Eduardo Bart 9a30050340 Fix typo 2013-11-10 23:40:29 -02:00
Eduardo Bart 9d689f0c43 Add missing changes for protocol > 1000 2013-11-10 23:31:59 -02:00
BrunoDCC 7d7bd00a63 minor fix :3 2013-11-09 22:48:29 -02:00
BrunoDCC c81a623c43 Fixes for creatures name
fixes on save houses (Now open most generate some error)
First 10.22 commit (open dat to edit)
Add server id for new versions
2013-11-09 20:04:48 -02:00
Sam 6f9436dd60 UISprite widget added
Display single sprites
2013-10-30 21:35:29 +01:00
Joao Pasqualini Costa b3717ceb93 Fix - Writeable / Readable items 2013-10-21 22:25:12 -02:00
Joao Pasqualini Costa 084ee45650 A little mistake 2013-10-20 20:33:44 -02:00
Joao Pasqualini Costa 7290ec3334 Some work on container pagination
Bind lua functions for containers
Update onAddItem now it have the pagination slot
Note: getSize as i see is equal to getItemsCount, but not sure thats why
I've added !
2013-10-20 20:21:20 -02:00
Joao Pasqualini Costa 971d90a596 Fix protocol error #362
TODO:
Handle the helpers in LUA, it could be added into Battle Window i think,
if someone know where should this be comment here !
2013-10-20 18:31:20 -02:00
Sam 8230bf2af4 Merge branch 'master' of https://github.com/edubart/otclient 2013-10-20 17:15:30 +02:00
Sam 241b54262a Updated lua consts 2013-10-20 17:15:24 +02:00
Ahmed Samy 63ce68b449 mapio: make sure we read the house tile flag 2013-10-12 11:38:30 +02:00
BrunoDCC de3160c90d Save houses and spawns fix 2013-10-11 02:35:31 -03:00
Sam 778559c7b9 Protocol 10.10 fixed containers 2013-10-09 17:58:58 +02:00
Sam 3aac0ac0ec Reverting mapio.cpp change
Should not have been commited.
2013-10-07 21:38:55 +02:00
Sam 4adfafc67e Fix for Client 8.5 2013-10-07 21:32:13 +02:00
Sam 1b27a095a9 Hotkeys for Fluid Containers
Hotkeys now save subType for fluid containers instead of always trying
to use item with subType 0.
2013-10-05 18:08:49 +02:00
Sam 5843b78e87 Support for client version 7.6
Tell me if there are parts which I should change.

- Not everything is tested yet, feel free to report bugs in 7.6
- the data send in between login opcode and account data might not be
correct, but I could not find any documents showing the right protocol
yet
- Hotkeys working
2013-10-04 04:09:54 +02:00
Ahmed Samy 7cf645e715 Woops, fix operator less than 2013-09-02 19:12:12 +00:00
Ahmed Samy 537508021e Make g_map.findItemsById return a map instead of a vector 2013-09-02 17:53:32 +00:00
Ahmed Samy e741a62ce9 g_map.findItemsByid 2013-08-31 01:18:17 +00:00
Ahmed Samy 56d6ef6642 Introduce 4 new functions:
- g_map.beginGhostMode(float opacity)
- g_map.endGhostMode()
- UIMap::movePixels(int x, int y)
- MapView::move(int x, int y)
2013-08-30 01:54:36 +00:00
Ahmed Samy 3db8f54aa9 Introduce 2 new functions to g_things
- g_things.findItemTypesByName
- g_things.findItemTypesByString
2013-08-29 17:53:21 +00:00
Ahmed Samy 9234030c1b Zone colors: add more tile flags to be checked for 2013-08-27 15:49:48 +00:00
Ahmed Samy 520baa28ea Move "getNPC" that was introduced in commit
00729bbc2e
from Spawn to CreatureType

I didn't have a closer look at how his code was structured, what he
basically did
is that he set all creatures in a spawn as NPC's even if it's a monster
which is
so erroneous.

Highlights:
- Add branch prediction macros
- Minor code style fixes & some others

Hopefully the branch prediction thing will speed up OTB since it's
awfully slow.
2013-08-27 03:40:18 +02:00
KnopersPL 1f914351bb Update protocolcodes.cpp
Fix for server messages on 850
2013-08-25 12:24:18 +02:00
KnopersPL eb68504dc1 Update protocolgameparse.cpp
Fix the slow animation move effect, some opcodes error and logging in as GM
2013-08-25 12:20:54 +02:00
Ahmed Samy 32647f11bf Introduce 2 new functions to Map
- g_map.colorizeThing
- g_map.removeThingColor
2013-08-24 00:09:56 +02:00
Ahmed Samy 644d4daeea More cleanups 2013-08-23 02:12:36 +02:00
Ahmed Samy b27352c321 Merge branch 'master' of https://github.com/BrunoDCC/otclient
* 'master' of https://github.com/BrunoDCC/otclient:
  Add full npc read (it not cause bug)
  Fixed a npcs save Fixed a spawns and npcs load
2013-08-23 02:03:40 +02:00
BrunoDCC a6be9ae525 Add full npc read (it not cause bug) 2013-08-22 21:00:48 -03:00
Ahmed Samy 5df3ec8cf2 More cleanups
Also, bind map descriptions auxiliar functions
2013-08-23 01:55:15 +02:00
BrunoDCC 00729bbc2e Fixed a npcs save
Fixed a spawns and npcs load
2013-08-22 20:54:09 -03:00
Ahmed Samy 3b2d8a2b5e Fix build 2013-08-22 23:20:44 +02:00
Ahmed Samy d5298c1011 Cleanups 2013-08-22 21:15:17 +02:00
Allan Ference aaad8ab8a0 Fix spawn loading and saving, thanks to @BrunoDCC 2013-08-20 12:14:52 +02:00
Allan Ference efbd9ab693 Attempt to fix spawn loader 2013-08-19 18:57:25 +02:00
Allan Ference 092209c0bb Attempt to fix houses and spawns save 2013-08-19 10:38:22 +02:00
Allan Ference 05f7f6a4cf Introduce Item::getName() 2013-08-18 18:29:20 +02:00
Joao Pasqualini Costa 96bb28e806 Fix Mount frame issue
This will fix mount for all protocols
2013-08-17 22:19:24 -03:00
Allan Ference e7137c2535 Rework NPCs loader with g_resources (Untested) 2013-08-17 23:36:44 +02:00
Allan Ference 5eabf6f518 Optional and configurable zone colors 2013-08-17 23:06:58 +02:00
Allan Ference 5849136526 Introduce g_things.findItemTypeByName 2013-08-17 15:09:10 +02:00
Allan Ference 0451fd6b58 OTBM saver: don't escape version check for waypoints 2013-08-15 11:20:22 +02:00
Allan Ference 9cf878335a Minor changes
Mainly code style
2013-08-14 18:58:53 +02:00
Allan Ference 1ea2b380ca Disregard progressbar 2013-08-09 17:35:56 +02:00
BrunoDCC 4d498ed0d8 Fix OTBM save
Remove if(version > 1) { (it causes bug)
2013-08-07 20:04:21 -03:00
Allan Ference 9aa667da26 MapEditor: more changes for ease of use 2013-08-04 14:21:12 +02:00
Allan Ference e6db43ac3a MapEditor specific: Use colors for tile states 2013-08-04 14:19:10 +02:00
Mark Samman 4a04a18835 Fix login with 9.83-10.10
This only adds protocol compatibility, the features aren't actually
implemented yet
2013-07-28 07:05:46 +02:00
BeniS 95abf2a1d2 Fix a bug with autowalking & add prompt param for tryLogout.
(We don't want to be prompted when pressing Ctrl + Q or  Ctrl + L).
2013-07-07 05:36:56 +12:00
Sam 987c6d6c91 Mount display issue
fixes #275
Not really needed but enables some cool stuff
2013-07-02 23:16:11 +02:00
Sam cc12db0d1f Reverted getTopMultiUseThing() change 2013-04-09 23:54:10 +02:00
Joao Pasqualini Costa 57bb6ff974 Fix #315 by @pacmanis
Credits go to @pacmanis
2013-04-09 18:02:43 -03:00
Joao Pasqualini Costa 6ef3508362 Properly Fix #301 2013-03-14 20:57:02 -03:00
Eduardo Bart a71e07f063 Restore walk optimization 2013-03-14 00:16:57 -03:00
Eduardo Bart e9e4dcd71b Improve walk when lagging 2013-03-13 20:55:20 -03:00
Eduardo Bart 8c016b143a Fix #294 2013-03-04 23:59:37 -03:00
Henrique Santiago 5396ea6231 Fix to last commit 2013-03-04 22:46:14 -03:00
Henrique Santiago 9955de573b Avoid infinite loop 2013-03-04 22:44:29 -03:00