mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-25 01:02:26 +00:00
Added lua export for Client:PlayMP3
This commit is contained in:
parent
a7c15ef598
commit
646e1f541c
@ -6,6 +6,8 @@ Secrets: Added functionality to Perl for $client->PlayMP3("name of file").
|
||||
Usage varies, but typically you can place an MP3/WAV/XMI in the EQDir//sounds, pfs, s3d, or root client folder and it will play through this Perl function. Example, $client->PlayMP3("combattheme1.mp3") or $client->PlayMP3("TUTBTrade1.mp3")
|
||||
All clients except Secrets of Faydwer and 6.2 have their opcodes identified for this function. The struct + supported params is the same throughout versions.
|
||||
Use $client->PlayMP3 with an invalid sound file to stop playback or simply wait for it to end.
|
||||
KLS: Added functionality to Lua for Client:PlayMP3(filename)
|
||||
KLS: Added functionality to Lua for Client:SendMarqueeMessage(type, priority/opacity, fade_in_time_ms, fade_out_time_ms, duration_ms, msg)
|
||||
|
||||
== 12/16/2013 ==
|
||||
Kayen: Implemented SE_ArcheryDoubleAttack (Chance to do an extra archery attack)
|
||||
|
||||
@ -1234,6 +1234,12 @@ void Lua_Client::SendMarqueeMessage(uint32 type, uint32 priority, uint32 fade_in
|
||||
self->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, msg);
|
||||
}
|
||||
|
||||
void Lua_Client::PlayMP3(std::string file)
|
||||
{
|
||||
Lua_Safe_Call_Void();
|
||||
self->PlayMP3(file.c_str());
|
||||
}
|
||||
|
||||
luabind::scope lua_register_client() {
|
||||
return luabind::class_<Lua_Client, Lua_Mob>("Client")
|
||||
.def(luabind::constructor<>())
|
||||
@ -1479,7 +1485,8 @@ luabind::scope lua_register_client() {
|
||||
.def("SetHunger", (void(Lua_Client::*)(int))&Lua_Client::SetHunger)
|
||||
.def("SetThirst", (void(Lua_Client::*)(int))&Lua_Client::SetThirst)
|
||||
.def("SetConsumption", (void(Lua_Client::*)(int, int))&Lua_Client::SetConsumption)
|
||||
.def("SendMarqueeMessage", (void(Lua_Client::*)(uint32, uint32, uint32, uint32, uint32, std::string))&Lua_Client::SendMarqueeMessage);
|
||||
.def("SendMarqueeMessage", (void(Lua_Client::*)(uint32, uint32, uint32, uint32, uint32, std::string))&Lua_Client::SendMarqueeMessage)
|
||||
.def("PlayMP3", (void(Lua_Client::*)(std::string))&Lua_Client::PlayMP3);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_inventory_where() {
|
||||
|
||||
@ -274,6 +274,7 @@ public:
|
||||
void SetThirst(int in_thirst);
|
||||
void SetConsumption(int in_hunger, int in_thirst);
|
||||
void SendMarqueeMessage(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, std::string msg);
|
||||
void PlayMP3(std::string file);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user