130 Commits

Author SHA1 Message Date
Paradox924X
7224f76a0a Added a check to make sure a player wasn't in a guild when they accepted a guild invitation. This fixes a few possible problems that could/would arise.
(Zomg. My first source commit. =x)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13317 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-21 07:59:09 +00:00
L0ne_W0lf
331e0a0a15 Enabled WoE SE to be run independently of WoE. Let's see how long it is before something blows up, or Ultramage pulls out his hair while cursing my existence.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13202 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-09 17:33:10 +00:00
ultramage
6efa1dd946 Patched a dormant off-by-one bug in guild leader changing code, which was triggered by r11571 and caused guild data corruption on TXT charserver (bugreport:2175).
Blame goes to r3185 and r3719.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13191 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-04 15:29:06 +00:00
ultramage
42bb5d7927 Temporary workaround against the party/guild send_xy_timer dangling pointer crash that is somehow still possible (bugreport:2143).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13169 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-01 02:53:58 +00:00
ultramage
6c8cf8d611 Replaced occurences of '-1' with the more appropriate 'INVALID_TIMER' value where appropriate.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12998 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26 14:22:28 +00:00
ultramage
304565cc9b Corrected r12662 where a guild break would trigger the OnGuildBreak event for all castles (even of other guilds).
Corrected some x64 compilation warnings in ers/malloc files.
cleaned up a case of bad variable reuse.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12666 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 11:09:57 +00:00
Kevin
1f6d5057bc Changed the last commit so it must be called with @reloaditemdb2. @reloaditemdb only removes the item_data from the itemdb subsystem. If you don't like my code you can uncomment the macro I_HATE_KEVIN in item_db.c so it isn't even compiled.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12662 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 09:15:05 +00:00
Kevin
2070c16a1b Uncommented and cleaned up the OnGuildBreak code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12659 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-26 22:20:20 +00:00
FlavioJS
c880052f0f * Changed the data field of timers from int to intptr.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21 21:34:31 +00:00
ultramage
c16def84aa Small party/guild creation cleanup. Added packet comments. Removed fake reply packet usage.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12538 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-08 15:54:52 +00:00
Kevin
db678f0eb0 Apparently I'm the only one that has it out for the alphabet.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12537 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-08 15:22:04 +00:00
Kevin
2fdec7d617 Added some aFrees, ultramage is a jerk.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12536 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-08 15:04:32 +00:00
Kevin
de171b1628 The fix in r12521 will now temporarily trim white space before checking the string length when creating a guild/party. (bugreport:1328)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12535 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-08 14:59:59 +00:00
FlavioJS
cd1f48cc9e * Made script command 'flagemblem' and guild_emblem_change send an update of the emblem_id to the players in the area.
- known bug: ui components that are displaying the emblem at the time (emblem in flag npc and emblem over head in gvg maps) are not updated, but putting the mouse over the target shows the new emblem
* Modified script command 'guardian':
- returns the id of the guardian
- if guardian index isn't supplied, it generates a temporary guardian
* Implemented support for temporary guardians (not saved with castle).
* Added missing includes from r12520.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12525 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-07 21:04:28 +00:00
Kevin
b316eef727 Party/guild names can no longer be less then 2 characters long.(bugreport:1328)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12521 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-07 15:10:37 +00:00
ultramage
94943b2b6a Adjusted eAthena code to compile cleanly in C++ mode.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-26 10:37:45 +00:00
zephyrus
fa64cdae0d - Added the official adoption method.
( Parents need to create a party, invite a novice/first class, both equip the wedding rings and someone just right click the future baby ).
- Fixed a bug sometimes client don't show job's bonus stats.
- Removed the problematic adoption script.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12389 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-18 04:32:20 +00:00
skotlex
1e0a82fab3 - Fixed new guilds displaying online-connect member count at 0 rather than 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://svn.code.sf.net/p/rathena/svn/trunk@12223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-21 00:13:56 +00:00
zephyrus
69ae4766ce - Added some new config settings: homunculus_autoloot, idle_no_autoloot, max_guild_alliance.
- Added a code to activate a Kill Steal protection and the required mapflags.
* (I will explain this later on forums).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12203 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-14 01:18:19 +00:00
ultramage
b24b80c5c9 Getting rid of map_getallusers(), part 1
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12195 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-11 17:46:31 +00:00
skotlex
224a459acf - Applied some cleanups to party.c/guild.c to ensure that direct pointers to sd are only done for valid sd states.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12194 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-11 14:11:41 +00:00
skotlex
e727c51605 - Added some error reporting when a player is not found inside its guild/party while logging out.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12148 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-29 12:49:30 +00:00
ultramage
65834585a8 Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, 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://svn.code.sf.net/p/rathena/svn/trunk@12020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 14:19:26 +00:00
ultramage
5790585d16 * Added flag.server to indicate interserver sockets
- replaces the previous way (setting 'client_addr' to 0)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11930 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-17 13:23:34 +00:00
ultramage
86b5e0c6f6 Replaced the 'map name' castle data variable with the equivalent 'map index'.
Optimized the castle lookup functions (direct dbmap enumeration, and no redundant operations inside the searching loop).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11918 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-16 21:00:36 +00:00
ultramage
950e40ed47 Some more guild code reformatting (moved do_init_guild() to the end of guild.c, cleaned up and documented the castle/guild/member lookup functions, fixed a compilation warning...)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11917 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-16 13:50:50 +00:00
ultramage
1e6922174e Guardian hp handling code removal (see bugreport:342)
- 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://svn.code.sf.net/p/rathena/svn/trunk@11915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-14 23:38:11 +00:00
ultramage
822ba1ddd7 Fixed a mistake in r11895 where guild invitation data was being cleared too soon, causing a check to fail when confirmation arrived from the charserver.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11902 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-13 23:29:41 +00:00
ultramage
8be1c4d48c * Some preparations for the guild script update
- 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://svn.code.sf.net/p/rathena/svn/trunk@11895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12 09:55:13 +00:00
ultramage
e464c81aea Removed the badly designed/unfinished guild_check_conflict() data integrity check (that wasn't actually being used up 'till now).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11894 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12 09:41:51 +00:00
ultramage
560005b13e Removed battle_config.error_log as console_silent already handles this
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-17 20:51:25 +00:00
ultramage
4957a893e5 Fixed some guild skill offset calculation mistakes -_-
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11732 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-14 09:38:44 +00:00
ultramage
5eda6c0e57 Replaced several 'int' variables with enums that they represent.
Expanded weapon_type enum with dual-wield constants (bugreport:384).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11704 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-09 22:42:56 +00:00
zephyrus
bec0f75b57 - Added a new setting 'guild_skill_relog_delay' to activate the guild skills delay on Guild Master relog.
- The official setting is 'No', but this is an option for game masters.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11699 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08 17:39:40 +00:00
FlavioJS
9d2688ad87 * Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.
* 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://svn.code.sf.net/p/rathena/svn/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08 14:08:32 +00:00
ultramage
78dd6eda46 Removed code that queues OnAgitEliminate after the Emperium is broken, this is now done properly by the gvg script instead (partially deals with bugreport:342).
If you have any extra castles, update your scripts accordingly.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11630 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-01 16:34:21 +00:00
ultramage
d091f1cf05 * Cleaned up some messy guild code (more to come)
* 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://svn.code.sf.net/p/rathena/svn/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24 12:14:18 +00:00
ultramage
2c2af57a84 * Removed commented-out code for check_fake_id()
* Merged improved/cleaned up (WiP) code for clif_parse_WisMessage
* Removed the requirement to provide a character name in the message string when calling is_atcommand() (needed for the previous fix)
- currently both ways work, but old will be removed in the upcoming command cleanup so please adjust your custom code if you use this!
* Added clif_process_message(), an unified way to validate all four types of player message packets and retrieve their components
* Applied the new checking function to clif code, this fixes various length mismatches caused by incomplete code in r11386 (bugreport:198)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11507 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18 12:49:49 +00:00
ultramage
c5b8e5d082 Added back log_chat's '1 - log everything' setting (revert from r10850).
Don't forget to adjust your config file ... again.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11289 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-24 22:33:50 +00:00
FlavioJS
65642f6f1c * Merged the tmpsql branch:
- 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://svn.code.sf.net/p/rathena/svn/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20 11:09:36 +00:00
ultramage
8519665bdb Adjusted a spot that still caused a guild leader's guild skills to get blocked on login
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11146 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-08 16:54:12 +00:00
skotlex
574c76e799 - Added support for the new party invite/reply packets from the latest client version.
- Cleared up some TODO's
- Added auto-rejecting party/guild invites when the target is disconnected from the server.
- Added a correction in the walking code to abort it when map_moveblock cancels the player's walking (by warping/knocking back),the default code would fail because unit_stopwalking would do nothing since the walk timer was already -1 in that moment.
- Corrected mob_randomwalk to use unsigned int for the tick variable.
- Changed the default @Main format to prevent crashes in the newer clients.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-07 07:31:58 +00:00
ultramage
0072a0189e * Cleaned/clarified some #include relationships between headers
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects)
* Removed way messed-up script function 'unitdeadsit'
* Tagged 'FIXME' lines written by myself

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19 12:55:29 +00:00
ultramage
bc31c68ad5 The new functions now clear junk from the output buffer, this simplifies the code a bit.
Added a TODO for one emblem loading problem/crash.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09 11:02:44 +00:00
ultramage
f5f77a5d51 * Cleaned up junk left in the code by the mapcache/mapindex update
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing
- Moved related processing to the interface (prevents duplicity)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08 17:41:49 +00:00
ultramage
ae259970a8 - Fixed guild emblem not showing when you log in (caused by r5359)
- Fixed server not sending party/guild info when you enter a map
- Fixed server not removing member minimap dot when you leave a guild

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10624 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-26 13:01:10 +00:00
ultramage
dfdb5368c7 Corrected some weird fgets() statements, plus reformatted them
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25 15:21:53 +00:00
ultramage
301d493855 - Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast time and delay reducibility by item scripts (cards and such)
- Fixed Martyr's Reckoning never triggering for gms with all skills
- Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter 
- Made gm_skill_unconditional bypass skill blocking (guild timer, etc)
- Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059)
- Changed a few memsets to strncpy (reading past buffer is a bad idea)
- Sped up some memset operations (multiples of 4 are faster)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23 21:23:36 +00:00
ultramage
711d01a128 Reformatting @_@
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19 15:50:41 +00:00
ultramage
16671ef54f * Added Global chat and Main chat logging
- lowered the priority of the 'logging off during gw' filter

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10580 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19 13:26:02 +00:00