summaryrefslogtreecommitdiff
path: root/src/map/battleground.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-16/+16
- Variable scopes reduced - Parenthesized ambiguous expressions - Removed or added NULL checks where (un)necessary - Corrected format strings - Fixed typos potentially leading to bugs Signed-off-by: Haru <haru@dotalux.com>
2015-01-17Another ~10 Fixesshennetsind1-1/+1
Addressing out of bounds read/write, resource leaks. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-1710 Distinct fixesshennetsind1-1/+1
Addressing out of bounds read-write. Special Thanks to 4144, Haruna! Signed-off-by: shennetsind <ind@henn.et>
2014-12-31Add some missing null pointer checks after automatic checks.Andrei Karas1-5/+6
2014-11-16Whitespace cleanup (no code changes)Haru1-67/+57
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-05-30Fixed typos inside src/Shido1-2/+2
2014-05-16Follow-up to b6b3f58795288701d0e162d43fa6f0a47af913b3Haru1-1/+1
- Includes in some files weren't sorted alphabetically. Special thanks to KeiKun. Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-15/+18
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-18/+15
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Fixed order of includes in all source filesHaru1-15/+18
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
2014-03-22Follow up 4cc9d5f91cf6276e28cc02bb75fc4158d28d553bshennetsind1-1/+1
Fixed the afk-kick timer, special thanks to AnnieRuru. Signed-off-by: shennetsind <ind@henn.et>
2014-03-18BG Queue Fixes & +++shennetsind1-14/+89
Fixed issue where players would be able to join a ongoing game when queueing by meeting the criteria. Fixed/Implemented the maximum_afk_seconds setting. Fixed issue with the maxPlayers arena setting that'd cause the maximum to be less than specified. Added a new battlegrounds.conf setting "allowedTypes" for arenas in order for further customisation. Expect a few more soon. Special Thanks to AnnieRuru Signed-off-by: shennetsind <ind@henn.et>
2014-01-18Libconfig Interfacedshennetsind1-25/+25
Ready for plugin use. Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2014-01-14Updated return values of some atcommands.panikon1-19/+18
Altered many function types from int to bool(C99) and added meaningful return values. Altered many function types from int to void as they didn't have any meaningful return value. Replaced chrif_char_offline with a macro as this function did exactly the same as chrif_char_offline_nsd.
2014-01-11Hercules 1st 2014 MegaPatchshennetsind1-3/+3
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-11Corrected some local 'mapindex' variables shadowing the global oneHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2013-11-06Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-1/+4
2013-11-06BG Queue Updateshennetsind1-7/+32
Enabled Party/Guild joining methods, Implements first attempt at the splitting algorithm (Thanks to jaBote!) Checks item 1 on issue #69 Help us test! -- http://hercules.ws/board/topic/1302-bg-queue-debug/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-1/+4
- Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another.
2013-10-26Changed 'tick' variables to 64 bitHaru1-3/+3
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-10-02HPM: Map.c Completedshennetsind1-2/+2
Fully Interfaced. Moved missing vars and declarations of interest into the interface, removed duplicate mentions of map within calls to shorten wherever it made sense to. Ladies and Gentleman its my pleasure to announce that with this commit we've revised all of map-server, we've learned a hell lot from this, improved many things on the go and have a number of features to be released thanks to this. *cough* hpm hooking *cough*. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Renamed iMap interface to mapHaru1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2013-09-27Renamed iStatus interface to statusHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2013-09-26Renamed variables that would conflict with a rename of iMap to mapHaru1-2/+2
Note to plugin developers: if you were importing the "map", you'll need to change it to "maplist" Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-48/+43
Conflicts: src/map/chrif.c src/map/clif.c src/map/homunculus.c src/map/pet.c src/map/script.c src/map/skill.c src/map/status.c All clear.
2013-09-25Renamed iTimer interface to timer.shennetsind1-6/+6
Also removed duplicate mentions of timer within calls to shorten.
2013-09-24Renamed some variables forgotten when adding the battleground interfaceHaru1-48/+43
- Follow-up to 35c131c - Fixes bugreport:7721, thanks to purityz, Dastgir Pojee http://hercules.ws/board/tracker/issue-7721-lastest-update-make-map-crashing-on-battleground/ Signed-off-by: Haru <haru@dotalux.com>
2013-09-17HPM: Battleground.c Interfaceshennetsind1-51/+68
Fully Integrated. Closes #97 Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Mapreg_sql.c Interfaceshennetsind1-2/+2
Fully Integrated Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Npc.c Interfaceshennetsind1-2/+2
Fully Interfaced. Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-07-29BG Queue Fixesshennetsind1-29/+53
Cleared 3 out of 5, #69 Support for the cancel button, for pre-game position to return afterwards and fix to the queue position problem after first game. Signed-off-by: shennetsind <ind@henn.et>
2013-07-25Expanding script.c interfaceshennetsind1-2/+2
Hercules Renewal Phase One. Signed-off-by: shennetsind <ind@henn.et>
2013-07-05Fixed Bug #7483shennetsind1-1/+1
Special Thanks to Igniz http://hercules.ws/board/tracker/issue-7483-battleground-warning/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-05DB Queue Debug Updateshennetsind1-13/+27
Some documentation update on battlegrounds.conf Fixed Hercules Queue Option constants, they're 1-2-3 not 0-1-2. Some Bugfixes to the test script, special thanks to ossi0110 http://hercules.ws/board/topic/1302-bg-queue-debug Signed-off-by: shennetsind <ind@henn.et>
2013-07-04- Added interface iStatus (needed to renamed it because A LOT of variables ↵Susu1-1/+1
are already called 'status')
2013-07-01Fixed Bug #7216shennetsind1-0/+1
Special Thanks to Shikazu, wouldn't have been able to identify this issue without his help! http://hercules.ws/board/index.php?app=tracker&showissue=7216 Signed-off-by: shennetsind <ind@henn.et>
2013-06-30Fixed Skill Cooldownsshennetsind1-4/+2
Special Thanks to Vylow for bringing this to our attention. Also added support for the client-side cooldown left/total feature (packetver 20120604 and newer) Made Possible Thanks to Yommy =3 Signed-off-by: shennetsind <ind@henn.et>
2013-06-28BG Queue Testingshennetsind1-16/+46
http://hercules.ws/board/topic/1302-bg-queue-debug/ Signed-off-by: shennetsind <ind@henn.et>
2013-06-15bg queue minor progressshennetsind1-1/+13
Signed-off-by: shennetsind <ind@henn.et>
2013-06-08Follow up d73783f22b2bb881aab74524d153d89a5932a199shennetsind1-1/+1
Adjusting db.c interface name to adhere with the rest (pretty much we try to make it as short as we can, and being there were no conflicts we saw no reason to maintain the 'i') Signed-off-by: shennetsind <ind@henn.et>
2013-06-08Follow up d73783f22b2bb881aab74524d153d89a5932a199shennetsind1-3/+3
Adjusting party.c interface name to adhere with the rest (pretty much we try to make it as short as we can, and being there were no conflicts we saw no reason to maintain the 'i') Signed-off-by: shennetsind <ind@henn.et>
2013-06-08Follow up d73783f22b2bb881aab74524d153d89a5932a199shennetsind1-2/+2
Adjusting pc.c interface name to adhere with the rest (pretty much we try to make it as short as we can, and being there were no conflicts we saw no reason to maintain the 'i') Signed-off-by: shennetsind <ind@henn.et>
2013-06-07Hercules Renewal Phase One : pc, party, map, timerSusu1-15/+15
Added iPc, iParty, iMap, iTimer to HPM exported interfaces
2013-05-30Follow up 20bdc01fa687b174a732be4483ddea4982d67ce9shennetsind1-1/+1
Fixed warnings pinpointed by mkbu95 (THANKS) Signed-off-by: shennetsind <ind@henn.et>
2013-05-30Memory Slasher - May 30 Patchshennetsind1-18/+490
http://hercules.ws/board/topic/928-memory-slasher-may-30-patch/ Signed-off-by: shennetsind <ind@henn.et>
2013-05-17- Made DB and malloc lib HPM-friendlySusu1-1/+1
- Also fixed a bug preventing the plugins to be loeaded because HPMI and HPMI_s weren't HPExport
2013-05-15Hercules Renewal Phase One: guild.c startedshennetsind1-3/+4
http://hercules.ws/board/topic/237-hercules-renewal/ Signed-off-by: shennetsind <ind@henn.et>
2013-03-29Hercules Renewal: clif.cshennetsind1-7/+7
1st Phase Complete. http://hercules.ws/board/topic/237-hercules-renewal/ Signed-off-by: shennetsind <ind@henn.et>
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-164/+165
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-165/+164
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec