|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
 |
|
 |

08-12-2009, 12:12 AM
|
 |
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,449
|
|
Diff @ r921
Code:
Index: perlparser.cpp
===================================================================
--- perlparser.cpp (revision 921)
+++ perlparser.cpp (working copy)
@@ -547,6 +547,24 @@
XSRETURN_EMPTY;
}
+XS(XS__voicetell);
+XS(XS__voicetell)
+{
+ dXSARGS;
+ if (items != 4)
+ Perl_croak(aTHX_ "Usage: voicetell(clientname, type, race, gender)");
+
+ char * str = (char *)SvPV_nolen(ST(0));
+ int macronum = (int)SvIV(ST(1));
+ int racenum = (int)SvIV(ST(2));
+ int gendernum = (int)SvIV(ST(3));
+
+ quest_manager.voicetell(str, macronum, racenum, gendernum);
+
+ XSRETURN_EMPTY;
+}
+
+
XS(XS__depop);
XS(XS__depop)
{
@@ -2817,6 +2835,7 @@
newXS(strcpy(buf, "shout"), XS__shout, file);
newXS(strcpy(buf, "shout2"), XS__shout2, file);
newXS(strcpy(buf, "gmsay"), XS__gmsay, file);
+ newXS(strcpy(buf, "voicetell"), XS__voicetell, file);
newXS(strcpy(buf, "depop"), XS__depop, file);
newXS(strcpy(buf, "settarget"), XS__settarget, file);
newXS(strcpy(buf, "follow"), XS__follow, file);
Index: questmgr.cpp
===================================================================
--- questmgr.cpp (revision 921)
+++ questmgr.cpp (working copy)
@@ -392,6 +392,10 @@
worldserver.SendChannelMessage(0,0,11,0, 0, "%s", str);
}
+void QuestManager::voicetell(char *str, int macronum, int racenum, int gendernum) {
+ worldserver.SendVoiceMacroFromMob(owner,1,str,macronum, racenum, gendernum);
+}
+
void QuestManager::depop(int npc_type) {
if(!owner->IsNPC())
return;
Index: questmgr.h
===================================================================
--- questmgr.h (revision 921)
+++ questmgr.h (working copy)
@@ -63,6 +63,7 @@
void shout(const char *str);
void shout2(const char *str);
void gmsay(const char *str);
+ void voicetell(char *str, int macronum, int racenum, int gendernum);
void depop(int npc_type = 0);
void depopall(int npc_type = 0);
void depopzone(bool StartSpawnTimer = true);
Index: worldserver.cpp
===================================================================
--- worldserver.cpp (revision 921)
+++ worldserver.cpp (working copy)
@@ -1507,6 +1507,39 @@
return Ret;
}
+bool WorldServer::SendVoiceMacroFromMob(Mob* From, int32 Type, char* Target, int32 MacroNumber, int16 racenum, int8 gendernum) {
+
+ if(!worldserver.Connected())
+ return false;
+
+ ServerPacket* pack = new ServerPacket(ServerOP_VoiceMacro, sizeof(ServerVoiceMacro_Struct));
+
+ ServerVoiceMacro_Struct* svm = (ServerVoiceMacro_Struct*) pack->pBuffer;
+
+ if(!From){
+ strcpy(svm->From, "A Mysterious Voice");
+ }
+ else {
+ strcpy(svm->From, From->GetCleanName());
+ }
+
+ strcpy(svm->To, Target);
+
+ svm->Type = 1;
+
+ svm->Voice = (racenum * 2) + gendernum;
+
+ svm->MacroNumber = MacroNumber;
+
+ pack->Deflate();
+
+ bool Ret = SendPacket(pack);
+
+ safe_delete(pack);
+
+ return Ret;
+}
+
bool WorldServer::RezzPlayer(EQApplicationPacket* rpack,int32 rezzexp, int16 opcode) {
_log(SPELLS__REZ, "WorldServer::RezzPlayer rezzexp is %i (0 is normal for RezzComplete", rezzexp);
ServerPacket* pack = new ServerPacket(ServerOP_RezzPlayer, sizeof(RezzPlayer_Struct));
Index: worldserver.h
===================================================================
--- worldserver.h (revision 921)
+++ worldserver.h (working copy)
@@ -39,6 +39,7 @@
bool SendEmoteMessage(const char* to, int32 to_guilddbid, int32 type, const char* message, ...);
bool SendEmoteMessage(const char* to, int32 to_guilddbid, sint16 to_minstatus, int32 type, const char* message, ...);
bool SendVoiceMacro(Client* From, int32 Type, char* Target, int32 MacroNumber, int32 GroupOrRaidID = 0);
+ bool SendVoiceMacroFromMob(Mob* From, int32 Type, char* Target, int32 MacroNumber, int16 racenum, int8 gendernum);
void SetZone(int32 iZoneID, int32 iInstanceID = 0);
int32 SendGroupIdRequest();
bool RezzPlayer(EQApplicationPacket* rpack,int32 rezzexp, int16 opcode);
|
 |
|
 |

08-12-2009, 02:04 PM
|
Hill Giant
|
|
Join Date: Dec 2004
Location: in your closet....
Posts: 169
|
|
Do you have a list of voice emotes?
__________________
a hill giant slashes YOU for 25 points of damage!
You have been slain!
LOADING, PLEASE WAIT...
|

08-12-2009, 07:46 PM
|
 |
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,449
|
|
Quote:
Originally Posted by RichardoX
Do you have a list of voice emotes?
|
Yes. Open up the voice window in-game for clients, the IDs are there.
|

08-15-2009, 03:56 AM
|
Hill Giant
|
|
Join Date: Dec 2004
Location: in your closet....
Posts: 169
|
|
Quote:
Originally Posted by Secrets
Yes. Open up the voice window in-game for clients, the IDs are there.
|
Very awesome creation Secrets! 
__________________
a hill giant slashes YOU for 25 points of damage!
You have been slain!
LOADING, PLEASE WAIT...
|

01-27-2010, 12:17 PM
|
 |
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,449
|
|
Should this be moved to custom code, or is it good enough to commit it?
I've been using this and the only thing it needs is a null pointer check for (!Target), incase of invis GMs. Other than that, it works fine.
|

01-27-2010, 01:10 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
I'll commit it shortly.
|

01-27-2010, 01:34 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
Just looking at it now, do we really need the ability to send the VoiceTell from a quest to a player in another zone ?
If not, then we can just do an entity_list.GetClientByName and send an OP_VoiceMacroOut directly to them in the current zone, rather than shipping a packet off to world.
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 04:57 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |