[Dev rev 360] Fix for Union War

Put your bugs you find in osRose here

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

[Dev rev 360] Fix for Union War

Postby lmame on Fri Jul 30, 2010 2:08 pm

So here are the fixes (or so I think) to enable again the Union War on latest naRose client.
They changed a few things in their requirements so I guess it can explain several stuff.

It should fix the following issues:
-> no announcement when not enough people for Union War,
-> Union War not starting even if there were enough people,


REPLACE:
  1.    if(ObjvarIndex==2&&refNPC>=1088&&refNPC<=1091&&(orgvalue==30||orgvalue==33))
  2.     {
  3.         if(orgvalue==30&&data->btOp==2)
  4.         {
  5.             orgvalue=GServer->UWNbPlayers;
  6.             LogDebug("QSDC11::UW We trapped NPC %i[%i]>=%i (replaces >= %i)",refNPC,ObjvarIndex,orgvalue,data->iValue);
  7.         }
  8.  
  9.         if(orgvalue==33&&data->btOp==4)
  10.         {
  11.             orgvalue=GServer->UWNbPlayers+3;
  12.             LogDebug("QSDC11::UW We trapped NPC %i[%i]<=%i (replaces <= %i)",refNPC,ObjvarIndex,orgvalue,data->iValue);
  13.         }
  14.  
  15.     }


BY:
  1.    if(ObjvarIndex==2&&refNPC>=1088&&refNPC<=1091&&(orgvalue==20||orgvalue==23))
  2.     {
  3.         if(orgvalue==20&&data->btOp==2)
  4.         {
  5.             orgvalue=GServer->UWNbPlayers;
  6.             LogDebug("QSDC11::UW We trapped NPC %i[%i]>=%i (replaces >= %i)",refNPC,ObjvarIndex,orgvalue,data->iValue);
  7.         }
  8.  
  9.         if(orgvalue==23&&data->btOp==4)
  10.         {
  11.             orgvalue=GServer->UWNbPlayers+3;
  12.             LogDebug("QSDC11::UW We trapped NPC %i[%i]<=%i (replaces <= %i)",refNPC,ObjvarIndex,orgvalue,data->iValue);
  13.         }
  14.  
  15.     }



REPLACE:
  1.  
  2.     if(ObjvarIndex==2&&monster->thisnpc->refNPC>=1088&&monster->thisnpc->refNPC<=1091&&(orgvalue==30||orgvalue==33))
  3.     {
  4.         if(orgvalue==30&&data->btOp==2)
  5.         {
  6.             orgvalue=GServer->UWNbPlayers;
  7.             LogDebug("QSDCC11::UW We trapped NPC %i[%i]>=%i (replaces >= %i)",monster->thisnpc->refNPC,ObjvarIndex,orgvalue,data->iValue);
  8.         }
  9.  
  10.         if(orgvalue==33&&data->btOp==4)
  11.         {
  12.             orgvalue=GServer->UWNbPlayers+3;
  13.             LogDebug("QSDCC11::UW We trapped NPC %i[%i]<=%i (replaces <= %i)",monster->thisnpc->refNPC,ObjvarIndex,orgvalue,data->iValue);
  14.         }
  15.  
  16.     } 



BY:
  1.  
  2.     if(ObjvarIndex==2&&monster->thisnpc->refNPC>=1088&&monster->thisnpc->refNPC<=1091&&(orgvalue==20||orgvalue==23))
  3.     {
  4.         if(orgvalue==20&&data->btOp==2)
  5.         {
  6.             orgvalue=GServer->UWNbPlayers;
  7.             LogDebug("QSDCC11::UW We trapped NPC %i[%i]>=%i (replaces >= %i)",monster->thisnpc->refNPC,ObjvarIndex,orgvalue,data->iValue);
  8.         }
  9.  
  10.         if(orgvalue==23&&data->btOp==4)
  11.         {
  12.             orgvalue=GServer->UWNbPlayers+3;
  13.             LogDebug("QSDCC11::UW We trapped NPC %i[%i]<=%i (replaces <= %i)",monster->thisnpc->refNPC,ObjvarIndex,orgvalue,data->iValue);
  14.         }
  15.  
  16.     } 



REPLACE:
  1.  
  2.     if(data->btMsgType == 1)
  3.     {
  4.         //LogDebug("%s shouts Nb %i::%s",GServer->LtbstringQSD[data->iStrID]->NPCname,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  5.         //GServer->NPCShout(thisMonster,GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->LtbstringQSD[data->iStrID]->NPCname);
  6.         //LogDebug("%s (%i) shouts Nb %i::%s",GServer->GetNPCNameByType(thisMonster->aip_npctype),thisMonster->aip_npctype,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  7.         //GServer->NPCShout(thisMonster,GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetNPCNameByType(thisMonster->aip_npctype));
  8.         LogDebug("%s (%i) shouts Nb %i::%s",GServer->GetSTLMonsterNameByID(good_npc),thisMonster->aip_npctype,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  9.         GServer->NPCShout(thisMonster,GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetSTLMonsterNameByID(good_npc));
  10.     }
  11.     else if(data->btMsgType == 2)
  12.     {
  13.         //LogDebug("%s (%i) announces Nb %i::%s",GServer->GetNPCNameByType(thisMonster->aip_npctype),thisMonster->aip_npctype,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  14.         //GServer->NPCAnnounce(GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetNPCNameByType(thisMonster->aip_npctype));
  15.         LogDebug("%s (%i) announces Nb %i::%s",GServer->GetSTLMonsterNameByID(good_npc),thisMonster->aip_npctype,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  16.         GServer->NPCAnnounce(GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetSTLMonsterNameByID(good_npc),thisMonster->Position->Map);
  17.     }
  18.  


BY:
  1.  
  2.     //LMA: sometimes another NPC/monster calls another NPC to shoot.
  3.     //we have to find the right one.
  4.     int good_map=thisMonster->Position->Map;
  5.     if (thisMonster->thisnpc->refNPC!=0&&thisMonster->thisnpc->refNPC!=thisMonster->aip_npctype)
  6.     {
  7.         CNPC* findNPC=GServer->GetNPCByType(thisMonster->thisnpc->refNPC);
  8.         if(findNPC!=NULL)
  9.         {
  10.             good_map=findNPC->posMap;
  11.         }
  12.  
  13.     }
  14.  
  15.     if(data->btMsgType == 1)
  16.     {
  17.         //LogDebug("%s shouts Nb %i::%s",GServer->LtbstringQSD[data->iStrID]->NPCname,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  18.         //GServer->NPCShout(thisMonster,GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->LtbstringQSD[data->iStrID]->NPCname);
  19.         //LogDebug("%s (%i) shouts Nb %i::%s",GServer->GetNPCNameByType(thisMonster->aip_npctype),thisMonster->aip_npctype,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  20.         //GServer->NPCShout(thisMonster,GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetNPCNameByType(thisMonster->aip_npctype));
  21.         LogDebug("%s (%i) shouts Nb %i::%s",GServer->GetSTLMonsterNameByID(good_npc),thisMonster->aip_npctype,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  22.         //GServer->NPCShout(thisMonster,GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetSTLMonsterNameByID(good_npc));
  23.         GServer->NPCShout(thisMonster,GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetSTLMonsterNameByID(good_npc),good_map);
  24.     }
  25.     else if(data->btMsgType == 2)
  26.     {
  27.         //LogDebug("%s (%i) announces Nb %i::%s",GServer->GetNPCNameByType(thisMonster->aip_npctype),thisMonster->aip_npctype,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  28.         //GServer->NPCAnnounce(GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetNPCNameByType(thisMonster->aip_npctype));
  29.         LogDebug("%s (%i) announces Nb %i::%s",GServer->GetSTLMonsterNameByID(good_npc),thisMonster->aip_npctype,data->iStrID,GServer->LtbstringQSD[data->iStrID]->LTBstring);
  30.         //GServer->NPCAnnounce(GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetSTLMonsterNameByID(good_npc),thisMonster->Position->Map);
  31.         GServer->NPCAnnounce(GServer->LtbstringQSD[data->iStrID]->LTBstring,GServer->GetSTLMonsterNameByID(good_npc),good_map);
  32.     }
  33.  


If you want to test, be sure to read this thread to use the gm commands /setuw and /setuwnb:
viewtopic.php?f=18&t=2585&p=30839&hilit=uwnbplayers#p30839
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8741
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev rev 360] Fix for Union War

Postby Choseal on Fri Jul 30, 2010 4:01 pm

Looking good so far, I already got the message saying there are not enough registered players to start the Union Wars. :lol:
Choseal
Pero pero
Pero pero
 
Posts: 660
Joined: Fri Jan 09, 2009 6:40 pm

Re: [Dev rev 360] Fix for Union War

Postby thriel on Fri Jul 30, 2010 4:36 pm

i can confirm this fix works. good work lmame ;)

if i get any bugs reported i will forward them to you.
Image
The Best Rose Server in the whole World ! - http://www.roseza.co.za ( Now supports both RSA and international players. )
User avatar
thriel
Pomic
Pomic
 
Posts: 100
Joined: Fri Jun 05, 2009 7:36 am
Location: South Africa

Re: [Dev rev 360] Fix for Union War

Postby Raavi on Fri Jul 30, 2010 6:00 pm

Great, it works, thankyou!
Raavi
Pomic
Pomic
 
Posts: 117
Joined: Sun May 30, 2010 4:15 pm

Re: [Dev rev 360] Fix for Union War

Postby lmame on Sat Jul 31, 2010 1:30 am

Ok :)
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8741
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev rev 360] Fix for Union War

Postby thriel on Sat Jul 31, 2010 7:24 am

it was reported that the quest is not removed from the quest log after UW is finished, you carry it with you to the next Unionwars and dont have to sign up again . is this normal ?
Image
The Best Rose Server in the whole World ! - http://www.roseza.co.za ( Now supports both RSA and international players. )
User avatar
thriel
Pomic
Pomic
 
Posts: 100
Joined: Fri Jun 05, 2009 7:36 am
Location: South Africa

Re: [Dev rev 360] Fix for Union War

Postby lmame on Sat Jul 31, 2010 10:01 am

Try to go back to your Union NPC when the War is over and you're warped back to Junon Polis. If I remember correctly it's them who remove the quest.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8741
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev rev 360] Fix for Union War

Postby rl2171 on Sat Jul 31, 2010 2:54 pm

lmame wrote:Try to go back to your Union NPC when the War is over and you're warped back to Junon Polis. If I remember correctly it's them who remove the quest.



I've done alot of these UW in NA, the quest is removed automatically when you are warped back to JP.

Is this what you need to know?
Image
rl2171
Admin
Admin
 
Posts: 1446
Joined: Mon Aug 06, 2007 5:17 pm
Location: Sacramento, CA USA - GMT-8

Re: [Dev rev 360] Fix for Union War

Postby Choseal on Sat Jul 31, 2010 4:14 pm

Does anyone know if this works for the New Junon?
Choseal
Pero pero
Pero pero
 
Posts: 660
Joined: Fri Jan 09, 2009 6:40 pm

Re: [Dev rev 360] Fix for Union War

Postby lmame on Sat Jul 31, 2010 4:15 pm

rl2171 wrote:
lmame wrote:Try to go back to your Union NPC when the War is over and you're warped back to Junon Polis. If I remember correctly it's them who remove the quest.

I've done alot of these UW in NA, the quest is removed automatically when you are warped back to JP.
Is this what you need to know?


Yeah kinda.
Anyway I won't work on this "bug". If it's still there in dev rev II perhaps, in the meantime the player has only to remove the quest from its quest list.

Choseal wrote:Does anyone know if this works for the New Junon?

Don't know I don't have it.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8741
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest