|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
| Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum) |
 |
|
 |

10-26-2006, 03:40 PM
|
|
Demi-God
|
|
Join Date: Jul 2006
Posts: 1,552
|
|
Quote:
|
Originally Posted by KLS
Hum another thing I noticed something seems up with Character rules, they aren't loading from the DB correctly for me and trying to list them with #rules list Character returns: Failed to list rules!
|
Almost sure we saw this error before the recent changes. It's in another thread about the rules system, I believe.
Back to groups... I found one thing which you might have mentioned. If the leader sends an invite to all party members before any one of them accepts, they can all join, and chat/buffs/etc all seem to work ok. If you invite 1 person, then they accept, then invite another, they get no invite.
As for my previous report, I was mixing how Group Buffs and Single Target buffs work, apparently. I think everything is just fine there, so I was way wrong! There still may be something in the message reporting, but I mostly played melee's on Live, so I cannot recall what message is given if you cast a group buff while targetting someone who is not in your group. No message at all, or should I still get the buff?
Sorry KLS. No issue with buffs and the new code, pretty sure.
Last edited by John Adams; 10-27-2006 at 12:20 AM..
|
 |
|
 |

10-26-2006, 04:32 PM
|
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
Something with the #rules list:
Code:
RuleManager::CategoryType RuleManager::FindCategory(const char *catname) {
int r;
for(r = 1; r < _CatCount; r++) {
if(strcasecmp(catname, s_categoryNames[r]) == 0)
return((CategoryType) r);
}
return(InvalidCategory);
}
Any reason we start the index at 1 instead of 0? I changed that and rules seem to list fine.
Rule loading appears just a matter of me being a newbie, wasn't using #rules store default for default rules like I should have been.
On live if you cast a group buff on someone not in your group without /tgb on it will target your group else it will target theirs. /tgb seems to be a little iffy on the emu though, was gonna say I couldn't reproduce your issue at all. Unsure of the message you should be getting.
|

10-27-2006, 03:22 AM
|
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
I tryed to use #rules to set my server to lvl 50, it told me that same message about failing. But it worked. I thought that was odd myself.
|
 |
|
 |

10-27-2006, 01:40 PM
|
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
Was noticing current end wasn't saving right with #save and zoning when I came across this:
in Client::FinishConnState2(DBAsyncWork* dbaw) (at about line 5980)
Code:
CalcBonuses();
CalcMaxHP();
CalcMaxMana();
if (m_pp.cur_hp <= 0)
m_pp.cur_hp = GetMaxHP();
SetHP(m_pp.cur_hp);
Mob::SetMana(m_pp.mana);
SetEndurance(m_pp.endurance);
We calculate maxhp and max mana in calcbonuses.
Code:
void Client::CalcBonuses()
{
_ZP(Client_CalcBonuses);
memset(&itembonuses, 0, sizeof(StatBonuses));
CalcItemBonuses(&itembonuses);
CalcEdibleBonuses(&itembonuses);
RecalcWeight();
CalcSpellBonuses(&spellbonuses);
CalcMaxHP();
CalcMaxMana();
CalcMaxEndurance();
CalcAC();
CalcATK();
CalcHaste();
CalcSTR();
CalcSTA();
CalcDEX();
CalcAGI();
CalcINT();
CalcWIS();
CalcCHA();
CalcMR();
CalcFR();
CalcDR();
CalcPR();
CalcCR();
rooted = FindType(SE_Root);
}
An issue I see is we calc the hp/mana/end before we calculate the stats which could potentially cause problems, could we not change this stuff to:
Code:
CalcBonuses();
if (m_pp.cur_hp <= 0)
m_pp.cur_hp = GetMaxHP();
SetHP(m_pp.cur_hp);
Mob::SetMana(m_pp.mana);
SetEndurance(m_pp.endurance);
Code:
void Client::CalcBonuses()
{
_ZP(Client_CalcBonuses);
memset(&itembonuses, 0, sizeof(StatBonuses));
CalcItemBonuses(&itembonuses);
CalcEdibleBonuses(&itembonuses);
RecalcWeight();
CalcSpellBonuses(&spellbonuses);
CalcAC();
CalcATK();
CalcHaste();
CalcSTR();
CalcSTA();
CalcDEX();
CalcAGI();
CalcINT();
CalcWIS();
CalcCHA();
CalcMR();
CalcFR();
CalcDR();
CalcPR();
CalcCR();
CalcMaxHP();
CalcMaxMana();
CalcMaxEndurance();
rooted = FindType(SE_Root);
}
That way we would only calculate hp and mana once at that point and max endurance would calculate correctly on connection.
|
 |
|
 |

10-28-2006, 06:08 PM
|
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
Here's what's up with the groups:
When we do it the way I do it, what I assume is probably the correct way the client switches from using GroupInvite opcode to GroupInvite2 opcode and GroupFollow opcode to GroupFollow2 opcode. Of course no one ever figured those opcodes out so they're all set to 0x0000.
Here are the titanium opcodes, I don't have the 0.6.2 opcodes yet because I don't have a 0.6.2 client atm.
Code:
OP_GroupFollow2=0x42c9 #this is a 2nd version of follow, that's used with invite version 2 is used
OP_GroupInvite2=0x12d6 #this is a 2nd version of invite
Tested it with 3 people and it worked fine, leader could talk and could invite the 3rd person correctly. Such a simple problem and it only took me 2 days to figure out.
Last edited by KLS; 10-29-2006 at 02:12 AM..
|

10-28-2006, 06:18 PM
|
|
Demi-God
|
|
Join Date: Jul 2006
Posts: 1,552
|
|
lol, well at least you CAN figure it out. Maybe if I stick with this a few years, I might learn something. 
|
 |
|
 |

10-29-2006, 12:32 PM
|
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
For 6.2
Code:
OP_GroupInvite2=0x1f27
I wasn't able to find the OP_GroupFollow2 for 6.2, but the client appears to only send a OP_GroupFollow2 on accepting a group they were invited to with OP_GroupInvite2. So I made a little work around in Handle_OP_GroupInvite2 that recreates the incoming packet but always sets it to a GroupInvite opcode before sending it to the target.
Code:
void Client::Handle_OP_GroupInvite2(const EQApplicationPacket *app)
{
if (app->size != sizeof(GroupInvite_Struct)) {
LogFile->write(EQEMuLog::Error, "Invalid size for OP_GroupInvite: Expected: %i, Got: %i",
sizeof(GroupInvite_Struct), app->size);
return;
}
if(this->GetTarget() != 0 && this->GetTarget()->IsClient()) {
//Make a new packet using all the same information but make sure it's a fixed GroupInvite opcode so we
//Don't have to deal with GroupFollow2 crap.
EQApplicationPacket* outapp = new EQApplicationPacket(OP_GroupInvite, sizeof(GroupInvite_Struct));
memcpy(outapp->pBuffer, app->pBuffer, outapp->size);
this->GetTarget()->CastToClient()->QueuePacket(outapp);
safe_delete(outapp);
return;
}
/*if(this->GetTarget() != 0 && this->GetTarget()->IsNPC() && this->GetTarget()->CastToNPC()->IsInteractive()) {
if(!this->GetTarget()->CastToNPC()->IsGrouped()) {
EQApplicationPacket* outapp = new EQApplicationPacket(OP_GroupUpdate,sizeof(GroupUpdate_Struct));
GroupUpdate_Struct* gu = (GroupUpdate_Struct*) outapp->pBuffer;
gu->action = 9;
strcpy(gu->membername,GetName());
strcpy(gu->yourname,GetTarget()->CastToNPC()->GetName());
FastQueuePacket(&outapp);
if (!isgrouped){
Group* ng = new Group(this);
entity_list.AddGroup(ng);
}
entity_list.GetGroupByClient(this->CastToClient())->AddMember(GetTarget());
this->GetTarget()->CastToNPC()->TakenAction(22,this->CastToMob());
}
else {
LogFile->write(EQEMuLog::Debug, "IPC: %s already grouped.", this->GetTarget()->GetName());
}
}*/
return;
}
Tested on 6.2 earlier and it worked fine, will need to go test on titanium tonight but don't see why it shouldn't work.
|
 |
|
 |
| 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 08:42 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |