diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-11-12 15:11:47 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-11-12 15:11:47 +0000 |
commit | 526f9a301caa29d1922561104de9aea8bc213b65 (patch) | |
tree | bc2852547d0b41843375dcf406c00e1ee54117d9 | |
parent | 628ac878c21c5150528b969ac151cd2450e2549d (diff) | |
download | mana-526f9a301caa29d1922561104de9aea8bc213b65.tar.gz mana-526f9a301caa29d1922561104de9aea8bc213b65.tar.bz2 mana-526f9a301caa29d1922561104de9aea8bc213b65.tar.xz mana-526f9a301caa29d1922561104de9aea8bc213b65.zip |
NPC lists
-rw-r--r-- | The Mana World.dev | 30 | ||||
-rw-r--r-- | docs/TODO.txt | 8 | ||||
-rw-r--r-- | src/game.cpp | 15 | ||||
-rw-r--r-- | src/graphic/graphic.cpp | 7 | ||||
-rw-r--r-- | src/gui/char_select.cpp | 1 | ||||
-rw-r--r-- | src/gui/chat.cpp | 3 | ||||
-rw-r--r-- | src/gui/chat.h | 2 | ||||
-rw-r--r-- | src/gui/npc.cpp | 24 | ||||
-rw-r--r-- | tmw.ini | 9 |
9 files changed, 62 insertions, 37 deletions
diff --git a/The Mana World.dev b/The Mana World.dev index a9094a10..607a05a9 100644 --- a/The Mana World.dev +++ b/The Mana World.dev @@ -16,7 +16,7 @@ Linker=-ljgmod_@@_-lalfont_@@_-lalleg_@@_-lwsock32_@@_ IsCpp=1 Icon=The Mana World.ico ExeOutput= -ObjectOutput= +ObjectOutput=src\objects OverrideOutput=1 OverrideOutputName=tmw.exe HostApplication= @@ -24,28 +24,28 @@ Folders=graphic,gui,net,sound CommandLine= UseCustomMakefile=0 CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=1 +IncludeVersionInfo=1 +SupportXPThemes=0 CompilerSet=0 CompilerSettings=0000001001001000001101 [VersionInfo] Major=0 -Minor=1 -Release=1 -Build=1 +Minor=0 +Release=8 +Build=39 LanguageID=1033 CharsetID=1252 -CompanyName= -FileVersion= -FileDescription=Developed using the Dev-C++ IDE -InternalName= -LegalCopyright= +CompanyName=The Mana World Development Team +FileVersion=0.0.8 +FileDescription=The Mana World +InternalName=tmw.exe +LegalCopyright=2004 (C) LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion= -AutoIncBuildNr=0 +OriginalFilename=tmw.exe +ProductName=The Mana World MMORPG +ProductVersion=0.0.8 +AutoIncBuildNr=1 [Unit8] FileName=src\log.cpp diff --git a/docs/TODO.txt b/docs/TODO.txt index a73a7e77..e45dae01 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -1,13 +1,11 @@ 1) Gui - Fix drag & drop (ElvenProgrammer) - Add iconify button (ElvenProgrammer) - - Skill point assignement (ElvenProgrammer) - Trading system (SimEdw) - - Add config dialog + - Add config dialog (SimEdw) 2) Sound engine - ogg/mp3 playback (kth5) 3) Npc - - Multi-page dialogs (SimEdw) - Quest system (SimEdw) 4) Chat - Shift when overlaying (kth5) @@ -25,6 +23,6 @@ - Clothing and hairstyling system - Item drops (ElvenProgrammer) - Minimap - - Trading system 8) Optimization - - Bubble sort->quick sort
\ No newline at end of file + - Bubble sort->quick sort + - Fix A*
\ No newline at end of file diff --git a/src/game.cpp b/src/game.cpp index 0a0534f5..df741710 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -381,8 +381,13 @@ void do_parse() { break; // Success to walk request case 0x0087: - if(walk_status==1) - walk_status = 2; + if(walk_status==1) { + if(get_src_x(RFIFOP(6))==src_x) + if(get_src_y(RFIFOP(6))==src_y) + if(get_dest_x(RFIFOP(6))==get_x(player_node->coordinates)) + if(get_dest_y(RFIFOP(6))==get_y(player_node->coordinates)) + walk_status = 2; + } break; // Add new being / stop monster case 0x0078: @@ -675,10 +680,8 @@ void do_parse() { break; // Level up case 0x019b: - if(RFIFOW(2)==0) { - ok("Info", "Level up!"); - } else if(RFIFOW(2)==1) { - ok("Info", "Job level up!"); + if(RFIFOL(2)==player_node->id) { + sound.StartWAV("./data/sound/wavs/level.wav", 10); } break; // Emotion diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 3cc90377..cc4ec179 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -244,6 +244,11 @@ void do_graphic(void) { node->frame = (get_elapsed_time(node->tick_time)*4)/(node->speed); if(node->frame>=4) { node->frame = 0; + if(node->action==WALK) + if(walk_status==1) { + set_coordinates(player_node->coordinates, src_x, src_y, direction); + walk_status = 0; + } node->action = STAND; // node->tick_time; if(node->id==player_node->id) @@ -486,7 +491,7 @@ void do_graphic(void) { update_stats_dialog(); gui_update(stats_player); - alfont_textprintf(double_buffer, gui_font, 0, 0, MAKECOL_WHITE, "FPS:%i %i %i", fps, player_node->frame, player_node->action); + alfont_textprintf(double_buffer, gui_font, 0, 0, MAKECOL_WHITE, "FPS:%i %i %i %i %i", fps, get_x(player_node->coordinates), get_y(player_node->coordinates),src_x,src_y); //alfont_textprintf(double_buffer, gui_font, 0, 20, MAKECOL_WHITE, "%i", show_npc_dialog); diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index b4294f3d..b1b88393 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -121,6 +121,7 @@ void char_select() { if((gui_exit==3)||((key[KEY_ENTER])&&(strcmp(button_state, "Del")==0)))server_char_select(); else if(gui_exit==4)close_session(); else if(gui_exit==5)server_char_delete(); + //alert("","","","","",0,0); if(state==LOGIN)close_session(); } diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 10823e3c..e8cfa4cc 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -184,7 +184,8 @@ char * Chat::chat_send(std::string nick, std::string msg) { if(msg.substr(0,IS_ANNOUNCE_LENGTH) == IS_ANNOUNCE) { msg.erase(0,IS_ANNOUNCE_LENGTH); packid = 0x0099; - } else { + } else if(msg.substr(0,IS_WHERE_LENGTH) == IS_WHERE) { + } else { packid = 0x008c; } // prepare ordinary message diff --git a/src/gui/chat.h b/src/gui/chat.h index c1126b52..fd6dae94 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -39,6 +39,8 @@ #define IS_ANNOUNCE "/announce " #define IS_ANNOUNCE_LENGTH 10 +#define IS_WHERE "/where " +#define IS_WHERE_LENGTH 7 /** gets in between usernick and message text depending on diff --git a/src/gui/npc.cpp b/src/gui/npc.cpp index 0b7a7102..37fc4eb2 100644 --- a/src/gui/npc.cpp +++ b/src/gui/npc.cpp @@ -50,7 +50,7 @@ char *item_list(int index, int *list_size) { void add_item(char *name) { ITEM *item = item_head; ITEM *temp = (ITEM *)malloc(sizeof(ITEM)); - temp->name = NULL; + //temp->name = NULL; temp->name = name; temp->next = NULL; if(!item_head) @@ -63,16 +63,29 @@ void add_item(char *name) { item_number++; } +void remove_tail() { + int iterator = 0; + ITEM *temp = item_head; + while(iterator<item_number-2) { + temp = temp->next; + iterator++; + } + free(temp->next); + temp->next = NULL; + item_number--; +} + void parse_items(char *string, short len) { char *token = strtok(string, ":"); while(token!=NULL) { - if(strcmp(token, "you prefer?")!=0) { // temp fix for the barber script + //if(strcmp(token, "you prefer?")!=0) { // temp fix for the barber script char *temp = (char *)malloc(strlen(token)); strcpy(temp, token); add_item(temp); - } + //} token = strtok(NULL, ":"); - } + } + remove_tail(); } void remove_all_items() { @@ -87,6 +100,5 @@ void remove_all_items() { } item_head = NULL; item_number = 0; -} - +} @@ -2,13 +2,12 @@ system = keyboard = en language = -version = 0.1 core_version = 0.0.8 [server] -host = animesites.de +;host = animesites.de ;host = themanaworld.homeip.net -;host = localhost +host = localhost ;host = telekommunisten.dyndns.org port = 6901 @@ -32,3 +31,7 @@ stretch = 0 [login] remember = 1 username = elven + +[patch_client] +version = 0.1 +url = http://localhost/ |