Clearing up misconceptions
#11
MongoJerry,Dec 27 2004, 02:00 PM Wrote:Hmmm... there must be something around.  I'm pretty sure Cosmos uses some kind of log parcer to figure out a person's dps on the fly.
[right][snapback]63662[/snapback][/right]

I just took a look at the code for DPSPLUS. It does very quick and dirty parsing for just the things it needs, such as:

Code:
    -- Player Processing
    if (DPSPLUS_Player_OnOff == 1) then
 if ( (type == "COMBAT_SELF_HITS") or (type == "SPELL_SELF_DAMAGE") or (type == "COMBAT_PET_HITS") or (type == "SPELL_PET_DAMAGE") ) then
     _, _, d = string.find(arg1, ".* for (%d+).*");
 elseif ( (type == "SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE") or (type == "SPELL_PERIODIC_CREATURE_DAMAGE") ) then
     _, _, d = string.find(arg1, ".* (%d+) .* from your .*");
 end
 
 -- Matched, Record this Entry
 if ( d ~= nil ) then
     dpsplus_addentry("Your", d);
     return DPSPLUS_Player_Eat;
 end
    end

I'm just barely starting to learn about how this fits together, so I am not sure where the caller is, but it looks like chat watching (log watching) has some stuff that is common among several Cosmos add-ons:

Code:
    Cosmos_RegisterChatWatch(
     "DPSPLUS_WATCHES",
     {"COMBAT_SELF_HITS", "SPELL_SELF_DAMAGE",
   "COMBAT_PET_HITS", "SPELL_PET_DAMAGE",
   "SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE", "SPELL_PERIODIC_CREATURE_DAMAGE",
   "COMBAT_PARTY_HITS", "SPELL_PARTY_DAMAGE"},
     DPSPLUS_Watch
     );  

Have to look up that code later...
Reply


Messages In This Thread
Clearing up misconceptions - by Lord BEEF - 12-01-2004, 07:32 AM
Clearing up misconceptions - by Artega - 12-01-2004, 05:25 PM
Clearing up misconceptions - by Ruvanal - 12-01-2004, 09:21 PM
Clearing up misconceptions - by Rinnhart - 12-06-2004, 09:50 PM
Clearing up misconceptions - by Treesh - 12-06-2004, 11:12 PM
Clearing up misconceptions - by Tal - 12-06-2004, 11:23 PM
Clearing up misconceptions - by vor_lord - 12-23-2004, 04:28 PM
Clearing up misconceptions - by stabby - 12-23-2004, 07:46 PM
Clearing up misconceptions - by vor_lord - 12-24-2004, 09:34 PM
Clearing up misconceptions - by MongoJerry - 12-27-2004, 09:00 PM
Clearing up misconceptions - by vor_lord - 12-30-2004, 03:58 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)