ArcEmu: [Applied]Update Smsg_npc_text_update Structure - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Applied]Update Smsg_npc_text_update Structure

#1 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 06 July 2010 - 05:42 AM

Patch Title: fix_npc_text.patch
What bug does this patch fix: It update the structure of SMSG_NPC_TEXT_UPDATE (https://sourceforge....cemu/ticket/144). This patch is from MesoX.
What is already tested : Building and I remember gossip where still displaying with the patch applied but I can't test anything else because my computer can't run Arcemu and WoW at the same time :/. It follow Mangos structure.

The SQL part :
ALTER TABLE `npc_text` CHANGE `em0_0` `EmoteDelay0_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em0_1` `Emote0_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em0_2` `EmoteDelay0_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em0_3` `Emote0_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em0_4` `EmoteDelay0_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em0_5` `Emote0_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `npc_text` CHANGE `em1_0` `EmoteDelay1_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em1_1` `Emote1_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em1_2` `EmoteDelay1_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em1_3` `Emote1_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em1_4` `EmoteDelay1_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em1_5` `Emote1_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `npc_text` CHANGE `em2_0` `EmoteDelay2_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em2_1` `Emote2_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em2_2` `EmoteDelay2_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em2_3` `Emote2_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em2_4` `EmoteDelay2_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em2_5` `Emote2_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `npc_text` CHANGE `em3_0` `EmoteDelay3_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em3_1` `Emote3_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em3_2` `EmoteDelay3_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em3_3` `Emote3_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em3_4` `EmoteDelay3_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em3_5` `Emote3_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `npc_text` CHANGE `em4_0` `EmoteDelay4_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em4_1` `Emote4_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em4_2` `EmoteDelay4_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em4_3` `Emote4_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em4_4` `EmoteDelay4_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em4_5` `Emote4_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `npc_text` CHANGE `em5_0` `EmoteDelay5_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em5_1` `Emote5_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em5_2` `EmoteDelay5_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em5_3` `Emote5_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em5_4` `EmoteDelay5_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em5_5` `Emote5_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `npc_text` CHANGE `em6_0` `EmoteDelay6_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em6_1` `Emote6_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em6_2` `EmoteDelay6_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em6_3` `Emote6_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em6_4` `EmoteDelay6_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em6_5` `Emote6_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `npc_text` CHANGE `em7_0` `EmoteDelay7_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em7_1` `Emote7_0` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em7_2` `EmoteDelay7_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em7_3` `Emote7_1` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em7_4` `EmoteDelay7_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `npc_text` CHANGE `em7_5` `Emote7_2` INT(10) UNSIGNED NOT NULL DEFAULT 0;

Attached File(s)


Sorry for my english, I'm french.
0

#2 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 06 July 2010 - 12:55 PM

This is from this patch: http://arcemu.org/fo...showtopic=21051
Posted Image
0

#3 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 05 August 2011 - 08:02 AM

Updating it as response to https://sourceforge....cemu/ticket/144
Sorry for my english, I'm french.
0

#4 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 05 August 2011 - 08:05 AM

shouldn't
-       uint32 Emote[6];
+       uint32 Emote[3];
+       uint32 EmoteDelay[3];

require an update of the database structure to reflect the changes in the code?
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#5 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 05 August 2011 - 08:46 AM

These fields already exist in the database but you can change their name if you want like that :

CODE REMOVED, LOOK AT THE FIRST POST FOR THE GOOD ONE.
Sorry for my english, I'm french.
0

#6 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 05 August 2011 - 08:59 AM

so in the database the order will be:
- EmoteDelay_0_0
- Emote_0_0
- EmoteDelay_0_1
- Emote_0_1
- EmoteDelay_0_2
- Emote_0_2

while in the GossipText_Text struct defined in NPCHandler.h it will be
struct GossipText_Text
{
	float Prob;
	char * Text[2];
	uint32 Lang;
	uint32 Emote[3];
	uint32 EmoteDelay[3];
};

so:
- Emote_0_0
- Emote_0_1
- Emote_0_2
- EmoteDelay_0_0
- EmoteDelay_0_1
- EmoteDelay_0_2

did you check if the database fields are loaded in the right struct member with your patch?
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#7 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 05 August 2011 - 09:20 AM

Oh sorry, I've quickly made the SQL based on how it's on packet here's the good one :

CODE REMOVED, LOOK AT THE FIRST POST FOR THE GOOD ONE.
Sorry for my english, I'm french.
0

#8 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 05 August 2011 - 11:05 AM

now the Database structure is
- EmoteDelay_0_0
- EmoteDelay_0_1
- EmoteDelay_0_2
- Emote_0_0
- Emote_0_1
- Emote_0_2

but the GossipText_Text one is still
- Emote_0_0
- Emote_0_1
- Emote_0_2
- EmoteDelay_0_0
- EmoteDelay_0_1
- EmoteDelay_0_2

the solution looks still far away...
I suggest to first decide the meaning of database columns and then update the GossipText_Text structure accordingly.
Could you please add to the first post format what's tested and what still need testing? (like if you created a plain new entry in the npc_text table, setting each field to a value of your choice and the ingame behaviour is exactly what is expected).
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#9 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 05 August 2011 - 12:24 PM

Ok, first post have been updated.

EDIT: Updated for r4447.
Sorry for my english, I'm french.
0

#10 User is offline   Hasbro 

  • Project Manager
  • PipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 2,526
  • Joined: 07-June 08
  • Gender:Male
  • Location:New York
  • Server OS:Windows

Posted 14 August 2011 - 03:26 PM

Bumping
0

#11 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 14 August 2011 - 05:00 PM

View PostSadikum, on 06 July 2010 - 05:42 AM, said:

but I can't test anything


View PostHasbro, on 14 August 2011 - 03:26 PM, said:

Bumping


This patch is missing any feedback so a "tested, fixes the issues" would be better than a "bump", as that doesn't add anything meaningful.
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#12 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 04 September 2011 - 01:06 PM

from *_world_structure.sql
  `em0_0` int(10) unsigned NOT NULL DEFAULT '0',
  `em0_1` int(10) unsigned NOT NULL DEFAULT '0',
  `em0_2` int(10) unsigned NOT NULL DEFAULT '0',
  `em0_3` int(10) unsigned NOT NULL DEFAULT '0',
  `em0_4` int(10) unsigned NOT NULL DEFAULT '0',
  `em0_5` int(10) unsigned NOT NULL DEFAULT '0',

so your ALTER TABLE queries are not only changing the name of the column but the type, too.
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#13 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 04 September 2011 - 01:40 PM

Fixed
Sorry for my english, I'm french.
0

#14 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 04 September 2011 - 02:12 PM

View PostSadikum, on 06 July 2010 - 05:42 AM, said:

What is already tested : Building

The patch you attached has
-		for(uint32 e = 0; e < 6; e++)
-			data << uint32(0x00);
+		for(uint8 i= 0; i < 8; i++)
+		{
+			data << float(1.0f);		// Prob
+			data << _player->GetSession()->LocalizedWorldSrv(70);
+			data << _player->GetSession()->LocalizedWorldSrv(70);
+			data << uint32(0x00);		// Language
 
-		for(int i = 0; i < 7; i++)
-		{
-			data << uint32(0x00);
-			data << uint8(0x00) << uint8(0x00);
-			data << uint32(0x00);	// ?
-			data << uint32(0x00);	// ?
-			for(uint32 e = 0; e < 6; e++)
-				data << uint32(0x00);	// emote 1
-		}
+			for(uint32 e = 0; e < 3; e++)
+			{
+				data << uint32(0x00);		// Emote delay
+				data << uint32(0x00);		// Emote
+			}

which removes "for(uint32 e = 0; e < 6; e++)" with just a statement after that to add another for loop with an opening bracket but no closing one, leading to

Quote

error C1075: end of file found before the left brace '{' at '..\..\src\arcemu-world\NPCHandler.cpp(525)' was matched
trunk\src\arcemu-world\NPCHandler.cpp 674

Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#15 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 04 September 2011 - 03:04 PM

Don't know how but last time I've tried the building was working. Anyway the patch is fixed now.
Sorry for my english, I'm french.
0

#16 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 04 September 2011 - 03:14 PM

Nice to see you updated both the sql queries and the patch (tho I just fixed them on my own right after reporting the issues).
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#17 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 04 September 2011 - 03:14 PM

- Applied.
- Moved to applied patches.
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users