summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-11 19:49:55 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-11 19:49:55 +0000
commit75d8e3d12caacd6a538982bb5c31ff1ce6f34527 (patch)
tree1a2cd9402304e6b67d6db9ab71ad163d23190558 /src/map/status.c
parent47d2e59ecf47d9f4d68458eb95e4a05fee06d8fb (diff)
downloadhercules-75d8e3d12caacd6a538982bb5c31ff1ce6f34527.tar.gz
hercules-75d8e3d12caacd6a538982bb5c31ff1ce6f34527.tar.bz2
hercules-75d8e3d12caacd6a538982bb5c31ff1ce6f34527.tar.xz
hercules-75d8e3d12caacd6a538982bb5c31ff1ce6f34527.zip
- Cleaned up unitattack, unittalk and unitdeadsit
- Updated status_get_name to take into account fakename, also cleaned it up. - Cleaned up the char-server code when the last point of a player is not found. First it'll check if there's any mapserver online, and then, if there is, it'll look for the major cities. If this fails, then the player will be told server is closed instead of trying to send him to a "random map". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8967 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 7a3d2c4eb..73bddae64 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -302,7 +302,6 @@ void initChangeTables(void) {
set_sc(ST_CHASEWALK, SC_CHASEWALK, SI_BLANK, SCB_SPEED);
set_sc(ST_REJECTSWORD, SC_REJECTSWORD, SI_REJECTSWORD, SCB_NONE);
add_sc(ST_REJECTSWORD, SC_AUTOCOUNTER);
-// set_sc(CG_MOONLIT, SC_MOONLIT, SI_MOONLIT, SCB_NONE);
set_sc(CG_MARIONETTE, SC_MARIONETTE, SI_MARIONETTE, SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK);
set_sc(CG_MARIONETTE, SC_MARIONETTE2, SI_MARIONETTE2, SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK);
add_sc(LK_SPIRALPIERCE, SC_STOP);
@@ -3915,18 +3914,21 @@ const char * status_get_name(struct block_list *bl)
nullpo_retr(0, bl);
switch (bl->type) {
case BL_MOB:
- return ((struct mob_data *)bl)->name;
+ return ((TBL_MOB*)bl)->name;
case BL_PC:
- return ((struct map_session_data *)bl)->status.name;
+ if(strlen(((TBL_PC *)bl)->fakename)>0)
+ return ((TBL_PC*)bl)->fakename;
+ return ((TBL_PC*)bl)->status.name;
case BL_PET:
- return ((struct pet_data *)bl)->pet.name;
+ return ((TBL_PET*)bl)->pet.name;
case BL_HOM:
- return ((struct homun_data *)bl)->master->homunculus.name;
+ if (((TBL_HOM*)bl)->master)
+ return ((TBL_HOM*)bl)->master->homunculus.name;
+ break;
case BL_NPC:
- return ((struct npc_data*)bl)->name;
- default:
- return "Unknown";
+ return ((TBL_NPC*)bl)->name;
}
+ return "Unknown";
}
/*==========================================