summaryrefslogtreecommitdiff
path: root/src/char/int_guild.c
AgeCommit message (Collapse)AuthorFilesLines
2013-02-18Improvements all over the placeshennetsind1-5/+6
Committing on the behalf of mkbu95 who is unable to do it himself, he coded it all and sent me the diff. Thanks mkbu95! Signed-off-by: shennetsind <ind@henn.et>
2013-02-16Updating the Headers across source filesshennetsind1-1/+1
And adding missing ones. Signed-off-by: shennetsind <ind@henn.et>
2013-02-07Fixing mistake in modified source code headersshennetsind1-1/+1
Signed-off-by: shennetsind <ind@henn.et>
2013-02-06Fixed Bug #7056shennetsind1-1/+1
atoll was introduced in a 2011 lib and vc9 and 10 dont have that, dropping to atol since we dont need the int64 and using a tricky conversion to get it to unsigned http://hercules.ws/board/tracker/issue-7056-compiling-error/ Signed-off-by: shennetsind <ind@henn.et>
2013-02-04Allow unsigned int values for guild exp (as it was before the change).akrus1-2/+2
2013-01-31Fixed Bug #3080shennetsind1-3/+4
Replaced strncpy with safestrncpy where I found would be beneficial. http://hercules.ws/board/tracker/issue-3080-safestrncpy-instead-of-strncpy-where-applicable/ Also modifying headers accordingly. Signed-off-by: shennetsind <ind@henn.et>
2013-01-27Fixed Bug #7035shennetsind1-1/+1
Char server displaying extra '/' in exp_guild path. http://hercules.ws/board/tracker/issue-7035-typo-in-charserv-sqlbat/ Signed-off-by: shennetsind <ind@henn.et>
2013-01-02-Follow up r17065 glighta1-25/+25
--removing useless check on skill_id --fix few broken atcommand due to failed sscanf -Change skill_amotion_leniency as pointed out on tid:76492 so amotion delay wont be twice by default, (also increase intervall if you do want higher acd) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17072 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-30-Harmonize skillid, skill_num, skillnum, skill, to skill_id and same for ↵glighta1-5/+5
skill_lv -Optimise type from int to int16 in order to reduce ram consumtion. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17065 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-22Community Contribution Time!momacabu1-2/+2
* Fixed bugreport:6303: official servers now always reshuffle the dice emoticon. To disable change the configuration to 'no'. Thanks to Vianna for providing the information! * Fixed bugreport:7026: creating a guild and exiting in a short amount of time wouldn't save the guild properly. Thank you clydelion! * Fixed bugreport:7030: removed warning introduced by r16987. Thanks Mr. Brian and Sir BuildBot for pointing! * Fixed bugreport:7031: if a player crashed during warp it would cause OnTouch_ to not trigger anymore. Thanks to flaviojs (eA-r15185) for the fix and Napster for pointing out! * Fixed bugreport:7032: Clementia and Canto Candidus give an additional of +1 str/agi/dex each 10 job levels (from caster). Thanks solvent! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-12- Follow up r17004 & bugreport:6995, added safer calculation to strategic ↵markzd1-2/+2
points at battle.c&status.c. - Implemented reading of renewal exp_guild.txt. (tid:75398) - Fixed Status Fogwall(Blinding Mist) to be reduced by status/card. (bugreport:4543) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-09* Use sv_readdb to read exp_guild.momacabu1-24/+11
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17012 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-1539/+1533
[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-1533/+1539
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29-Add some src basic documentation.glighta1-7/+9
-Change some remaining -1 for status ending timer. -Move some hardcoded msg in msg_athena -Small optimisation on battle_attr_fix git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13Enhanced `DBMap` implementation to allow storing integer type data in ↵gepard19841-3/+6
addition to void pointers. - Added enum for data: `int`, `unsigned int` and `void*` - Replaced generic `void*` data with `DBData` struct to hold `int`, `unsigned int` or `void*` (member of `DBNode`) - Added `db_i2data`, `db_ui2data` and `db_ptr2data` functions to cast from `int`/`uint`/`void*` to `DBData` (used in `DBMap::put()`) - Added `db_data2i`, `db_data2ui` and `db_data2ptr` functions to get `int`/`uint`/`void*` from `DBData` - Enabled statistics for new functions in `db_stats` struct - `DBCreateData` functions (used in `DBMap::ensure()`) now return `DBData` instead of `void*` - `DBApply` functions (used in `DBMap::foreach()` and `DBMap::destroy()`) now take `DBData*` as a parameter instead of `void*` - `DBMatcher` functions (used in `DBMap::getall()`) now take `DBData` as a parameter instead of `void*` - `DBReleaser` functions now take `DBData` as parameter instead of `void*` - Default releasers release data if it is `void*` (`DB_DATA_PTR`) type - `DBIterator` functions: `first()`, `last()`, `next()` and `prev()` now return `DBData*` instead of `void*` - `DBIterator::remove()` now returns `int` (1 if node was found and removed, 0 otherwise) instead of `void*` and takes an extra `DBData*` parameter for the data of removed entry - `DBMap::get()` and `DBMap::ensure()` now return `DBData*` instead of `void*` - `DBMap::remove()` and `DBMap::put()` now return `int` (1 if node already existed, 0 otherwise) instead of `void*` and take an extra `DBData*` parameter for the data of removed entry - `DBMap::put()` now takes `DBData` as parameter instead of `void*` - `DBMap::getall()` now puts data into `DBData**` buffer instead of `void**` buffer - Updated macros: - (`i`/`ui`/`str`)`db_get` and (`i`/`ui`/`str`)`db_ensure` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by `DBMap::get()` - added (`i`/`ui`/`str`)`db_iget` and (`i`/`ui`/`str`)`db_uiget` that get `DBData` from `DBMap` and extract `int`/`unsigned int` from it (with `db_data2i`/`db_data2ui`) - `db_put`, `idb_put`, `uidb_put` and `strdb_put` data params were wrapped with `db_ptr2data` to match new signature of `DBMap::put()` (`DBData` instead of `void*`) - added (`i`/`ui`/`str`)`db_iput` and (`i`/`ui`/`str`)`db_uiput` that put `int`/`unsigned int` into `DBMap` (first wrapping it with `DBData`) - added `NULL` in place of extra parameter for removed data in `db_remove` macros - `dbi_first`, `dbi_last`, `dbi_next` and `dbi_prev` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by these `DBIterator` functions - Updated `DBMap` documentation, and fixed a dozen of typos in it. - Updated rest of rA code to reflect `DBMap` changes (mostly required signature changes of `DBCreateData` and `DBApply` functions). - Fixed a bug where `DBMap::put()` would return data of a deleted entry. - Removed some unnecessary pointer casts. - Increased `showmsg.c` static buffer size to fit entire DBMap stats report. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-09Code cleanup: replaced `DBIterator` function calls with macros where possible. gepard19841-3/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-05- Guild Castle code cleanup:gepard19841-21/+3
- all changes to guild castle data are now handled first by map-server and only sent to char-server for saving - ensured that changes made to guild castle during char-server disconnection time will be resent on reconnect - actually removed definition of `MAX_GUILDCASTLE` (r15657) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-04- Guild Castle code cleanup:gepard19841-201/+125
- removed `MAX_GUILDCASTLE` limit - char-server now caches guild castles in `DBMap` - improved guild castle SQL queries to support non-default values of `MAX_GUARDIANS` - disallowed declaring guild castles on maps that are on other map-servers - map-server now requests data for all guild castles from char-server on initial connect (bugreport:287) - removed ''guildcastleinfo events'' as they were esentially duplicated ''OnAgitInit'' - optimized castle data load packets (bugreport:287) - updated WoE scripts to reflect source changes (scripts no longer need or should request castle or guild data) - updated related docs - Added `db_size` macro. - Replaced manual counting of castles occupied by a guild with `guild_checkcastles()` calls. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15657 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-02Replaced some magic numbers related to castle guardians with `MAX_GUARDIANS`.gepard19841-18/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15650 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed more trailing tabs.brianluau1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-20Merged TXT removal branch back to trunk.gepard19841-985/+1392
* TXT save engine is removed and no longer supported. * See also tid:53926, tid:57717. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07* Reverted r14563, due to multiple issues which render the source ↵ai4rei1-15/+15
malfunctioning or uncompilable. To be redone later (bugreport:4627). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07Changed almost all instances of sprintf() to snprintf().Paradox924X1-15/+15
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-02* Added defines for guild notice sizes (MAX_GUILDMES1 and MAX_GUILDMES2).ai4rei1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14544 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-22* Fixed guild and guild member exp truncation issue (bugreport:4130, since ↵ai4rei1-15/+15
r14242). - Fixed guild member position, hair, hair color, gender, class and level could potentially become corrupted due to shorts being read as ints (partially since r2986). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14487 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-22* Fixed saving/loading errors with compilers (such as VC6, MinGW), which do ↵ai4rei1-2/+2
not recognize %ll format (since r14242). - This also fixes guild leader name being displayed and saved as "(null)" in the guild member list. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14486 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-22* Fixed map server getting notified of hair, hair color, gender, class and ↵ai4rei1-1/+2
level changes from a char server (TXT only) twice (since r2986). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14485 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-01Replaced all occurrences of 'leaved' with 'withdraw'.Paradox924X1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14319 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-09Expanded range for cached and stored-in-db guild member exp (devotion) from ↵Paradox924X1-3/+3
uint32 to uint64. (bugreport:3983) Capped value when sending to client to INT_MAX to prevent confusion. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14242 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-16Fixed an exploit that makes guild skill get higher level than the max ↵Inkfish1-3/+3
defined in guild_skill_tree. (bugreport:3241) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13894 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-12TXT code has been re uploaded. Please note this does not change the fact ↵Kevin1-0/+1579
that TXT support has been dropped. There is no guarantee the code base will be managed and it will in the near future be REMOVED. If there is in ANY way TXT support in the future, it will be abstracted through a sql interface so only the sql code has to be maintained. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-12I live in a giant bucket.Kevin1-1579/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12570 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-26Adjusted eAthena code to compile cleanly in C++ mode.ultramage1-22/+22
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-21- Fixed new guilds displaying online-connect member count at 0 rather than ↵skotlex1-0/+1
1, and the guild master not knowing it is one (eg: it cannot edit the guild notice of a newly created guild until relogging). - Fixed acc_reg2 parsing screwing up the char_id and subtracting 2 from it rather than passing it as it is. - Extended the auth_node/auth_db system in chrif.c to handle log in/out and mapserver-change procedures. This way players are not in the main dbs when they are not "active", which blocks potential invalid accesses to them. - Replaced states auth, waiting_disconnect and finalsave with active. - Cleaned some the party/guild login and creation procedures, removed the party_sent/guild_sent states. - Removed a redundant guild_check_member call which is beyond not-needed and into the realm of wasting resources. - clif_parse will no longer process packets from !sd->state.active players, this also makes checking for finalsave uneccessary (since players re already removed from the maps and dbs by this point, so you can't access them in any other way) - Separated the roles of unit_free and map_quit, the former will handle cleaning structures from the player so it can be free'd safely, while the latter performs additional routines which are unique to characters logging out normally (map-server changes will invoke unit_free and bypass map_quit). - Removed pc_isplaying, quit_db, map_knowsaccount, MAPIT_PCISPLAYING among other functions/defines which are no longer needed due to the new login scheme. - Cleand up a bit some code in the clif_send(_sub) functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, ↵ultramage1-1/+0
generated by ShowMessage(). It now works exactly like printf(). Removed/replaced all printf calls in the code. Added a new flag to setting 'console_silent', for filtering debug messages. Silenced the "Broken pipe found" and "Server running in debug mode" messages. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18Fixed a glitch where the TXT charserver would not unlock castle.txt after ↵ultramage1-2/+2
creating it, thus preventing it from being saved correctly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11941 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-14Guardian hp handling code removal (see bugreport:342)ultramage1-100/+33
- removed guardian hp from the castle data structure, database, savefiles and various script functions (use upgrade_svn11914.sql) - removed guardian hp calculation and manipulation from the castle manager npc, now the hp values are updated by the server itself (glitch: when castle defense changes, all guardians are healed to full) - tweaked script function 'guardianinfo' to provide some data needed by the manager npc (currently available are hp, maxhp and visibility); also, it doesn't need a player attached to execute anymore The whole thing is experimental, use at your own risk (seems to work though...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12Some more tweaks to the guild codeultramage1-120/+171
- unrolling of foreach()/_sub() pairs using db iterators - usage of ARR_FIND instead of for()/break; - old function header adjustment git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11896 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12* Some preparations for the guild script updateultramage1-195/+256
- cleaned up npc event execution code - cleaned up guild data loading/saving code; to be improved later - removed dummy 'account name' expulsion list management code - removed columns 'rsv1' and 'rsv2' from guild member data - removed columns 'rsv1' 'rsv2' 'rsv3' and 'acc' from guild expulsion data - added upgrade_svn11895.sql for SQL git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12Removed the badly designed/unfinished guild_check_conflict() data integrity ↵ultramage1-35/+0
check (that wasn't actually being used up 'till now). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11894 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-11Fixed TXT charserver attempting to do a guild master change instead of an ↵ultramage1-1/+1
integrity check whenever a new guild member gets added. See revisions r3185 and r3719 on how the code arrived into such a state... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11890 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-26Fixed guild expulsion not working correctly.ultramage1-1/+1
Corrected explusion -> expulsion typo. Added packets from 2007-11-20a sakexe; there are some changes but can't test them yet, so they're left commented out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11808 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08* Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.FlavioJS1-4/+4
* Fixed gm_account_db not being deallocated in login-converter.c. * Refactoring names and documentation in db.h/db.c: - changed 'struct dbt' to 'struct DBMap' and 'DB' to 'DBMap*' - changed 'struct db' to 'struct DBMap_impl' and 'DB_impl' to 'DBMap_impl*' - changed COUNT to DB_COUNTSTAT and made it's existence not depend on DB_ENABLE_STATS - removed some @see links and corrected small typos in the documentation git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-26* Removed confusing map_nick2sd_nocase(), let the charserver handle itultramage1-0/+1
* Added correct packet for attachment retrieval failure when overweight * Fixed one more mistake in r11571 (Sql->SqlStmt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24* Cleaned up some messy guild code (more to come)ultramage1-3/+1
* Cleaned up the mail code, no more pointless dynamic allocation * Added upgrade_svn11548.sql to convert the mail table to new format * Updated vs7 and vs6 project files * Increased the max. send buffer size to 5M since 1M is not enough * Please complain if something stops working ^^; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17Using predefined constants as parameters to the exit() function.ultramage1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-4/+4
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-13Wiped out every mention of RETCODE from /src.ultramage1-5/+5
The servers no longer save data using CRCRLF as line terminator on Windows. Closes bugreport:45. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11187 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-3/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec