mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Exported TrainDisc to Lua.
Updated idle timer names.
This commit is contained in:
parent
c18e9d9503
commit
16afa277de
@ -1,6 +1,9 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
|
||||
== 02/27/2014 ==
|
||||
cavedude: Exported TrainDisc to Lua.
|
||||
|
||||
== 02/26/2014 ==
|
||||
Kayen: Implemented SE_FrenziedDevestation - increase critical spell chacnce and 2x mana cost for DD spells
|
||||
Kayen: Fixed SE_SpellProcChance - Now works on spell dervived procs
|
||||
@ -8,6 +11,7 @@ cavedude: Added two new NPC special_abilities. ALWAYS_FLEE, which forces the NPC
|
||||
cavedude: Fixed an issue where rectangular roamboxes could cause an NPC to get stuck on a single coord.
|
||||
cavedude: Added a new roambox column, mindelay allowing you to have more control over the roambox delay.
|
||||
Uleat: Fix for 'sqrt' failure on vs2010 clients
|
||||
image: Added idle zone timer to save CPU cycles.
|
||||
|
||||
Required SQL: utils/sql/git/required/2014_02_26_roambox_update.sql
|
||||
|
||||
|
||||
@ -560,6 +560,11 @@ void Lua_Client::UnscribeSpellAll(bool update_client) {
|
||||
self->UnscribeSpellAll(update_client);
|
||||
}
|
||||
|
||||
void Lua_Client::TrainDisc(int itemid) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->TrainDiscipline(itemid);
|
||||
}
|
||||
|
||||
void Lua_Client::UntrainDisc(int slot) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->UntrainDisc(slot);
|
||||
@ -1352,6 +1357,7 @@ luabind::scope lua_register_client() {
|
||||
.def("UnscribeSpell", (void(Lua_Client::*)(int,bool))&Lua_Client::UnscribeSpell)
|
||||
.def("UnscribeSpellAll", (void(Lua_Client::*)(void))&Lua_Client::UnscribeSpellAll)
|
||||
.def("UnscribeSpellAll", (void(Lua_Client::*)(bool))&Lua_Client::UnscribeSpellAll)
|
||||
.def("TrainDisc", (void(Lua_Client::*)(int))&Lua_Client::TrainDisc)
|
||||
.def("UntrainDisc", (void(Lua_Client::*)(int))&Lua_Client::UntrainDisc)
|
||||
.def("UntrainDisc", (void(Lua_Client::*)(int,bool))&Lua_Client::UntrainDisc)
|
||||
.def("UntrainDiscAll", (void(Lua_Client::*)(void))&Lua_Client::UntrainDiscAll)
|
||||
|
||||
@ -138,6 +138,7 @@ public:
|
||||
void UnscribeSpell(int slot, bool update_client);
|
||||
void UnscribeSpellAll();
|
||||
void UnscribeSpellAll(bool update_client);
|
||||
void TrainDisc(int itemid);
|
||||
void UntrainDisc(int slot);
|
||||
void UntrainDisc(int slot, bool update_client);
|
||||
void UntrainDiscAll();
|
||||
|
||||
19
zone/net.cpp
19
zone/net.cpp
@ -336,8 +336,10 @@ int main(int argc, char** argv) {
|
||||
bool worldwasconnected = worldserver.Connected();
|
||||
EQStream* eqss;
|
||||
EQStreamInterface *eqsi;
|
||||
Timer temp_timer(10);
|
||||
temp_timer.Start();
|
||||
uint8 IDLEZONEUPDATE = 200;
|
||||
uint8 ZONEUPDATE = 10;
|
||||
Timer zoneupdate_timer(ZONEUPDATE);
|
||||
zoneupdate_timer.Start();
|
||||
while(RunLoops) {
|
||||
{ //profiler block to omit the sleep from times
|
||||
|
||||
@ -381,13 +383,12 @@ int main(int argc, char** argv) {
|
||||
entity_list.AddClient(client);
|
||||
}
|
||||
|
||||
uint8 IDLEZONETIME = 200;
|
||||
if ( numclients < 1 && temp_timer.GetDuration() != IDLEZONETIME )
|
||||
temp_timer.SetTimer(IDLEZONETIME);
|
||||
else if ( numclients > 0 && temp_timer.GetDuration() == IDLEZONETIME )
|
||||
if ( numclients < 1 && zoneupdate_timer.GetDuration() != IDLEZONEUPDATE )
|
||||
zoneupdate_timer.SetTimer(IDLEZONEUPDATE);
|
||||
else if ( numclients > 0 && zoneupdate_timer.GetDuration() == IDLEZONEUPDATE )
|
||||
{
|
||||
temp_timer.SetTimer(10);
|
||||
temp_timer.Trigger();
|
||||
zoneupdate_timer.SetTimer(ZONEUPDATE);
|
||||
zoneupdate_timer.Trigger();
|
||||
}
|
||||
|
||||
//check for timeouts in other threads
|
||||
@ -402,7 +403,7 @@ int main(int argc, char** argv) {
|
||||
worldwasconnected = false;
|
||||
}
|
||||
|
||||
if (ZoneLoaded && temp_timer.Check()) {
|
||||
if (ZoneLoaded && zoneupdate_timer.Check()) {
|
||||
{
|
||||
if(net.group_timer.Enabled() && net.group_timer.Check())
|
||||
entity_list.GroupProcess();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user