This commit is contained in:
SecretsOTheP
2014-02-16 19:16:45 -05:00
16 changed files with 489 additions and 211 deletions
+4 -4
View File
@@ -241,7 +241,7 @@ void EQStreamFactory::CheckTimeout()
//everybody is done, we can delete it now
//std::cout << "Removing connection" << std::endl;
std::map<std::pair<uint32, uint16>,EQStream *>::iterator temp=stream_itr;
stream_itr++;
++stream_itr;
//let whoever has the stream outside delete it
delete temp->second;
Streams.erase(temp);
@@ -249,7 +249,7 @@ void EQStreamFactory::CheckTimeout()
}
}
stream_itr++;
++stream_itr;
}
MStreams.unlock();
}
@@ -284,7 +284,7 @@ Timer DecayTimer(20);
//copy streams into a seperate list so we dont have to keep
//MStreams locked while we are writting
MStreams.lock();
for(stream_itr=Streams.begin();stream_itr!=Streams.end();stream_itr++) {
for(stream_itr=Streams.begin();stream_itr!=Streams.end();++stream_itr) {
// If it's time to decay the bytes sent, then let's do it before we try to write
if (decay)
stream_itr->second->Decay();
@@ -306,7 +306,7 @@ Timer DecayTimer(20);
//do the actual writes
cur = wants_write.begin();
end = wants_write.end();
for(; cur != end; cur++) {
for(; cur != end; ++cur) {
(*cur)->Write(sock);
(*cur)->ReleaseFromUse();
}
+5 -5
View File
@@ -11,7 +11,7 @@ EQStreamIdentifier::~EQStreamIdentifier() {
std::vector<Record *>::iterator cur, end;
cur = m_streams.begin();
end = m_streams.end();
for(; cur != end; cur++) {
for(; cur != end; ++cur) {
Record *r = *cur;
r->stream->ReleaseFromUse();
delete r;
@@ -19,7 +19,7 @@ EQStreamIdentifier::~EQStreamIdentifier() {
std::vector<Patch *>::iterator curp, endp;
curp = m_patches.begin();
endp = m_patches.end();
for(; curp != endp; curp++) {
for(; curp != endp; ++curp) {
delete *curp;
}
}
@@ -56,7 +56,7 @@ void EQStreamIdentifier::Process() {
//if stream hasn't finished initializing then continue;
if(r->stream->GetState() == UNESTABLISHED)
{
cur++;
++cur;
continue;
}
if(r->stream->GetState() != ESTABLISHED) {
@@ -94,7 +94,7 @@ void EQStreamIdentifier::Process() {
//foreach possbile patch...
curp = m_patches.begin();
endp = m_patches.end();
for(; !found_one && curp != endp; curp++) {
for(; !found_one && curp != endp; ++curp) {
Patch *p = *curp;
//ask the stream to see if it matches the supplied signature
@@ -137,7 +137,7 @@ void EQStreamIdentifier::Process() {
delete r;
cur = m_streams.erase(cur);
} else {
cur++;
++cur;
}
} //end foreach stream
}
+1 -1
View File
@@ -138,7 +138,7 @@ public:
iterator cur, end;
cur = streams.begin();
end = streams.end();
for(; cur != end; cur++) {
for(; cur != end; ++cur) {
if(cur->second == it) {
streams.erase(cur);
//lazy recursive delete for now, since we have to redo
+4
View File
@@ -1704,11 +1704,13 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].ResistDiff=atoi(row[147]);
sp[tempid].dot_stacking_exempt=atoi(row[148]);
sp[tempid].RecourseLink = atoi(row[150]);
sp[tempid].no_partial_resist = atoi(row[151]) != 0;
sp[tempid].short_buff_box = atoi(row[154]);
sp[tempid].descnum = atoi(row[155]);
sp[tempid].effectdescnum = atoi(row[157]);
sp[tempid].not_reflectable = atoi(row[161]) != 0;
sp[tempid].bonushate=atoi(row[162]);
sp[tempid].EndurCost=atoi(row[166]);
@@ -1736,6 +1738,8 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].powerful_flag=atoi(row[209]);
sp[tempid].CastRestriction = atoi(row[211]);
sp[tempid].AllowRest = atoi(row[212]) != 0;
sp[tempid].NotOutofCombat = atoi(row[213]) != 0;
sp[tempid].NotInCombat = atoi(row[214]) != 0;
sp[tempid].persistdeath = atoi(row[224]) != 0;
sp[tempid].DamageShieldType = 0;
}
+17
View File
@@ -387,6 +387,9 @@ bool IsAERainNukeSpell(uint16 spell_id)
bool IsPartialCapableSpell(uint16 spell_id)
{
if (spells[spell_id].no_partial_resist)
return false;
if (IsPureNukeSpell(spell_id) || IsFearSpell(spell_id) ||
IsEffectInSpell(spell_id, SE_Root) ||
IsEffectInSpell(spell_id, SE_Charm))
@@ -672,6 +675,20 @@ bool IsDiscipline(uint16 spell_id)
return false;
}
bool IsCombatSkill(uint16 spell_id)
{
if (!IsValidSpell(spell_id))
return false;
//Check if Discipline OR melee proc (from non-castable spell)
if ((spells[spell_id].mana == 0 &&
(spells[spell_id].EndurCost || spells[spell_id].EndurUpkeep)) ||
((spells[spell_id].cast_time == 0) && (spells[spell_id].recast_time == 0) && (spells[spell_id].recovery_time == 0)))
return true;
return false;
}
bool IsResurrectionEffects(uint16 spell_id)
{
// spell id 756 is Resurrection Effects spell
+14 -8
View File
@@ -680,15 +680,18 @@ struct SPDat_Spell_Struct
/* 148 */ int8 dot_stacking_exempt; // If 1 doesn't stack with self cast by others. If -1 (not implemented) doesn't stack with same effect (???)
/* 149 */ //int deletable;
/* 150 */ uint16 RecourseLink;
/* 151 */ // 151: -1, 0, or 1
/* 151 */ bool no_partial_resist; // 151: -1, 0, or 1
// 152 & 153: all set to 0
/* 154 */ int8 short_buff_box; // != 0, goes to short buff box.
/* 155 */ int descnum; // eqstr of description of spell
/* 156 */ //int typedescnum; // eqstr of type description
/* 157 */ int effectdescnum; // eqstr of effect description
/* 158 */
/* 158 */ //Category Desc ID 3
/* 159 */ //bool npc_no_los;
/* 161 */ bool not_reflectable;
/* 162 */ int bonushate;
/* 163 */
/* 164 */ // for most spells this appears to mimic ResistDiff
/* 166 */ int EndurCost;
/* 167 */ int8 EndurTimerIndex;
/* 168 */ //int IsDisciplineBuff; //Will goto the combat window when cast
@@ -709,8 +712,8 @@ struct SPDat_Spell_Struct
/* 191 */ uint8 viral_targets;
/* 192 */ uint8 viral_timer;
/* 193 */ int NimbusEffect;
/* 194 */ float directional_start;
/* 195 */ float directional_end;
/* 194 */ float directional_start; //Cone Start Angle:
/* 195 */ float directional_end; // Cone End Angle:
/* 196 */
/* 197 */ bool not_extendable;
/* 198- 199 */
@@ -719,12 +722,14 @@ struct SPDat_Spell_Struct
/* 203 */ //int songcap; // individual song cap (how live currently does it, not implemented)
/* 204 - 206 */
/* 207 */ int spellgroup;
/* 208 */
/* 209 */ int powerful_flag; // Need more investigation to figure out what to call this, for now we know -1 makes charm spells not break before their duration is complete, it does alot more though
/* 210 */
/* 208 */ // int rank - increments AA effects with same name
/* 209 */ int powerful_flag; // Need more investigation to figure out what to call this, for now we know -1 makes charm spells not break before their duration is complete, it does alot more though
/* 210 */ // bool DurationFrozen; ???
/* 211 */ int CastRestriction; //Various restriction categories for spells most seem targetable race related but have also seen others for instance only castable if target hp 20% or lower or only if target out of combat
/* 212 */ bool AllowRest;
/* 213 - 218 */
/* 213 */ bool NotOutofCombat; //Fail if cast out of combat
/* 214 */ bool NotInCombat; //Fail if cast in combat
/* 215 - 218 */
/* 219 */ //int maxtargets; // is used for beam and ring spells for target # limits (not implemented)
/* 220 - 223 */
/* 224 */ bool persistdeath; // buff doesn't get stripped on death
@@ -795,6 +800,7 @@ int32 CalculateCorruptionCounters(uint16 spell_id);
int32 CalculateCounters(uint16 spell_id);
bool IsDisciplineBuff(uint16 spell_id);
bool IsDiscipline(uint16 spell_id);
bool IsCombatSkill(uint16 spell_id);
bool IsResurrectionEffects(uint16 spell_id);
bool IsRuneSpell(uint16 spell_id);
bool IsMagicRuneSpell(uint16 spell_id);