Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv677
Modified Files:
dbl_single_click.cpp skills.cpp skills.h uobject.cpp uobject.h
Log Message:
removed dead code
Index: dbl_single_click.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v
retrieving revision 1.209
retrieving revision 1.210
diff -C2 -d -r1.209 -r1.210
*** dbl_single_click.cpp 11 Aug 2003 03:34:40 -0000 1.209
--- dbl_single_click.cpp 17 Aug 2003 15:00:10 -0000 1.210
***************
*** 525,540 ****
return;
- // By Polygon: Clicked on a tattered treasure map, call decipher-function
- case 301:
- Skills->Decipher(pi, s);
- return;
- /*
- By Polygon:
- Clicked on a deciphered treasure map
- Show a map-gump with the treasure location in it
- */
- case 302: // Deciphered treasure map?
- return;
- // END OF: By Polygon
case 402: // Blackwinds Reputation ball
{
--- 525,528 ----
Index: skills.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/skills.cpp,v
retrieving revision 1.202
retrieving revision 1.203
diff -C2 -d -r1.202 -r1.203
*** skills.cpp 14 Aug 2003 19:12:57 -0000 1.202
--- skills.cpp 17 Aug 2003 15:00:14 -0000 1.203
***************
*** 61,70 ****
#include "debug.h"
- /*
- List of implemented skills:
- Arms Lore
-
- */
-
void cSkills::Hide( cUOSocket *socket )
{
--- 61,64 ----
***************
*** 229,335 ****
}
- /////////////////////////
- // name: BottleTarget
- // history: unknown, revamped by Duke,23.04.2000
- // Purpose: Uses the targeted potion bottle *outside* the backpack to
- // pour in the potion from the mortar
- //
- void cSkills::BottleTarget(int s)
- {
- /* P_ITEM pi=FindItemBySerPtr(buffer[s]+7);
- P_CHAR pc_currchar = currchar[s];
- if (!pi || pi->isLockedDown()) return; // Ripper
-
- if (pi->id()==0x0F0E) // an empty potion bottle ?
- {
- pi->ReduceAmount(1);
-
- P_ITEM mortar = FindItemBySerial(calcserial(addid1[s], addid2[s], addid3[s], addid4[s]));
- if(mortar == NULL) return;
- if (mortar->type() == 17)
- {
- pc_currchar->emote( tr("*%1 pours the completed potion into a bottle.*").arg(pc_currchar->name));
- Skills->PotionToBottle(pc_currchar, mortar);
- }
- }
- else
- sysmessage(s,"This is not an appropriate container for a potion.");*/
- }
-
- /////////////////////////
- // name: PotionToBottle
- // history: unknown, revamped by Duke,23.04.2000
- // Purpose: this really creates the potion
- //
- void cSkills::PotionToBottle(P_PLAYER pc, P_ITEM pi_mortar)
- {
- unsigned char id1,id2;
- char pn[50];
-
- if ( pc == NULL ) return;
-
- switch((10*pi_mortar->more1())+pi_mortar->more2())
- {
- case 11: id1=0x0F;id2=0x08;strcpy(pn, "an agility"); break;
- case 12: id1=0x0F;id2=0x08;strcpy(pn, "a greater agility"); break;
- case 21: id1=0x0F;id2=0x07;strcpy(pn, "a lesser cure"); break;
- case 22: id1=0x0F;id2=0x07;strcpy(pn, "a cure"); break;
- case 23: id1=0x0F;id2=0x07;strcpy(pn, "a greater cure"); break;
- case 31: id1=0x0F;id2=0x0D;strcpy(pn, "a lesser explosion"); break;
- case 32: id1=0x0F;id2=0x0D;strcpy(pn, "an explosion"); break;
- case 33: id1=0x0F;id2=0x0D;strcpy(pn, "a greater explosion"); break;
- case 41: id1=0x0F;id2=0x0C;strcpy(pn, "a lesser heal"); break;
- case 42: id1=0x0F;id2=0x0C;strcpy(pn, "a heal"); break;
- case 43: id1=0x0F;id2=0x0C;strcpy(pn, "a greater heal"); break;
- case 51: id1=0x0F;id2=0x06;strcpy(pn, "a night sight"); break;
- case 61: id1=0x0F;id2=0x0A;strcpy(pn, "a lesser poison"); break;
- case 62: id1=0x0F;id2=0x0A;strcpy(pn, "a poison"); break;
- case 63: id1=0x0F;id2=0x0A;strcpy(pn, "a greater poison"); break;
- case 64: id1=0x0F;id2=0x0A;strcpy(pn, "a deadly poison"); break;
- case 71: id1=0x0F;id2=0x0B;strcpy(pn, "a refresh"); break;
- case 72: id1=0x0F;id2=0x0B;strcpy(pn, "a total refreshment"); break;
- case 81: id1=0x0F;id2=0x09;strcpy(pn, "a strength"); break;
- case 82: id1=0x0F;id2=0x09;strcpy(pn, "a greater strength"); break;
- default:
- LogError("switch reached default");
- return;
- }
-
- P_ITEM pi_potion = 0;//Items->SpawnItem(pc, 1,"#",0, id1, id2,0,1,0);
- if (pi_potion == NULL)
- return;
-
- pi_potion->setName( QString( "%1 potion" ).arg( pn ) );
- pi_potion->setType( 19 );
- pi_potion->setMoreX(pi_mortar->morex());
- pi_potion->setMoreY(pi_mortar->more1());
- pi_potion->setMoreZ(pi_mortar->more2());
-
- // the remainder of this function NOT (yet) revamped by Duke !
-
- // Addon for Storing creator NAME and SKILLUSED by Magius(CHE) §
- if(!pc->isGM())
- {
- pi_potion->setCreator(pc->name()); // Magius(CHE) - Memorize Name of the creator
- if (pc->skillValue(ALCHEMY)>950) pi_potion->setMadeWith(ALCHEMY+1); // Memorize Skill used - Magius(CHE)
- else pi_potion->setMadeWith(0-ALCHEMY-1); // Memorize Skill used - Magius(CHE)
- } else {
- pi_potion->setCreator("");
- pi_potion->setMadeWith(0);
- }
-
- pi_potion->update();
- pi_mortar->setType( 0 );
- // items[i].weight=100; // Ripper 11-25-99
- // AntiChrist NOTE: please! use the HARDITEMS.SCP...
- // the settings used in that script are used EVERY TIME we have an item created via
- // code ( and not via script )...so we simply can add the string:
- // WEIGHT 100
- // in the "potion section" of that file, and EVERY TIME the potions are created via scripts
- // they have those settings! :) that's easy isn't it? =P
-
- return;
- }
-
void cSkills::SpiritSpeak(int s) // spirit speak time, on a base of 30 seconds + skill[SPIRITSPEAK]/50 + INT
{
--- 223,226 ----
***************
*** 604,739 ****
}
- ///////////////////////
- // name: TellScroll
- // history: unknown, modified by LB & AntiChrist,
- // partially revamped by Duke, 8 April 2000
- // Purpose: callback function for inscription menue
- // This is the point where control is returned after the user
- // selected a spell to inscribe/engrave from the gump menu.
- //
- void TellScroll( char *menu_name, int s, long snum )
- {
- /* P_CHAR pc_currchar = currchar[s];
- unsigned cir,spl;
- int part;
-
- if(snum<=0) return; // bad spell selction
-
- P_ITEM pi = FindItemBySerial(pc_currchar->lastTarget);
-
- cir=(int)((snum-800)/10); // snum holds the circle/spell as used in inscribe.gmp
- spl=(((snum-800)-(cir*10))+1); // i.e. 800 + 1-based circle*10 + zero-based spell
- // snum is also equals the item # in items.scp of the scrool to be created !
- P_ITEM pBackpack = Packitem(pc_currchar);
- if (pBackpack == NULL) return;
-
- AllItemsIterator iterItems;
- for (iterItems.Begin(); !iterItems.atEnd(); iterItems++) // find the spellbook
- {
- P_ITEM pb = iterItems.GetData();
- if (pb->type()==9 && (pb->contserial==pBackpack->serial ||
- (pb->layer()==1 && pc_currchar->Wears(pb))))
- {
- if (!Magic->CheckBook( cir, spl-1, pb))
- {
- sysmessage(s,"You don't have this spell in your spell book!");
- return;
- }
- }
- }
-
- int num = (8*(cir-1)) + spl; // circle & spell combined to a zero-based index
-
- Magic->Action4Spell(s,num);
- Magic->SpeakMantra4Spell(pc_currchar,num);
-
- if(!Magic->CheckReagents(pc_currchar, num)
- || !Magic->CheckMana(pc_currchar, num))
- {
- Magic->SpellFail(s);
- return;
- }
- Magic->SubtractMana4Spell(pc_currchar, num);
-
- if (pi->id()==0x0E34) //is it a scroll?
- {
- itemmake[s].Mat1id=0x0E34;
- itemmake[s].needs=1;
- itemmake[s].has = getamount(pc_currchar, 0x0E34);
- itemmake[s].minskill=(cir-1)*100; //set range values based on scroll level
- itemmake[s].maxskill=(cir+2)*100;
-
- Magic->DelReagents(pc_currchar, num);
-
- Skills->MakeMenuTarget(s,snum,INSCRIPTION); //put it in your pack
- }
- else if ((pi->att>0)||(pi->def>0)||(pi->hidamage())) //or is it an item?
- {
- part=0;
- switch(cir)
- {
- case 1: part = CheckThreeSkills(s, 11, 401);break;
- case 2: part = CheckThreeSkills(s, 61, 501);break;
- case 3: part = CheckThreeSkills(s, 161, 601);break;
- case 4: part = CheckThreeSkills(s, 261, 701);break;
- case 5: part = CheckThreeSkills(s, 361, 801);break;
- case 6: part = CheckThreeSkills(s, 461, 901);break;
- case 7: part = CheckThreeSkills(s, 661,1101);break;
- case 8: part = CheckThreeSkills(s, 761,1201);break;
- default:
- LogError("switch reached default");
- return;
- }
-
- if( part < 3 ) // failure !
- {
- switch(part)
- {
- case 0:
- sysmessage(s,"Your hand jerks and you punch a hole in the item");
- pi->setHp( pi->hp() - 3 );
- break;
- case 1:
- sysmessage(s,"Your hand slips and you dent the item");
- pi->setHp( pi->hp() - 2 );
- break;
- case 2:
- sysmessage(s,"Your hand cramps and you scratch the item");
- pi->setHp( pi->hp() - 1 );
- break;
- }
- if( pi->hp() < 1 )
- pi->setHp( 1 );
- }
- else // success !
- {
- if (!( pi->morez == 0 ||(pi->morex == cir && pi->morey == spl)) )
- sysmessage(s,"This item already has a spell!");
-
- else if ( pi->morez >= (9 - pi->morex)*2)
- sysmessage(s,"Item at max charges!");
-
- else
- {
- Skills->EngraveAction(s, pi, cir, spl); // check mana & set name
-
- if (!(pi->morex == cir && pi->morey == spl)) // not THIS spell
- {
- pi->setType2( pi->type() ); //kept type of item for returning to this type when item remain no charge
- pi->setType( 15 ); //make it magical
- pi->morex=cir;//spell circle
- pi->morey=spl;//spell number
- sysmessage(s,"Item successfully Engraved");
- }
- else
- sysmessage(s,"You added one more charge to the Item");
-
- pi->morez++; // charges
- sysmessage(s,"Item successfully Engraved");
- }
- }
- }//else if*/
- }
-
void cSkills::Meditation( cUOSocket *socket )
{
--- 495,498 ----
***************
*** 895,899 ****
// SetTimerSec(player->objectdelay(), SrvParams->objectDelay()+SrvParams->snoopdelay());
player->setObjectDelay( SetTimerSec(player->objectDelay(), SrvParams->objectDelay()+SrvParams->snoopdelay()) );
-
}
--- 654,657 ----
***************
*** 901,1023 ****
{
MakeMenus::instance()->callMakeMenu( socket, "CRAFTMENU_CARTOGRAPHY" );
- }
-
- /*
- By Polygon:
- Attempt to decipher a tattered treasure map
- Called when double-clicked such a map
- */
-
- void cSkills::Decipher(P_ITEM tmap, int s)
- {
- /* P_CHAR pc_currchar = currchar[s];
- char sect[500]; // Needed for script search
- int regtouse; // Stores the region-number of the TH-region
- int i; // Loop variable
- int btlx, btly, blrx, blry; // Stores the borders of the tresure region (topleft x-y, lowright x-y)
- int tlx, tly, lrx, lry; // Stores the map borders
- int x, y; // Stores the final treasure location
-
- if(pc_currchar->skilldelay<=uiCurrentTime || pc_currchar->isGM()) // Char doin something?
- {
- if (CheckSkill(pc_currchar, CARTOGRAPHY, tmap->morey * 10, 1000)) // Is the char skilled enaugh to decipher the map
- {
- P_ITEM nmap = Items->SpawnItemBackpack2(s, "70025", 0);
- if (nmap == NULL)
- {
- LogWarning("bad script item # 70025(Item Not found).");
- return; //invalid script item
- }
- char temp[256];
- sprintf(temp, "a deciphered lvl.%d treasure map", tmap->morez); // Give it the correct name
- nmap->setName( temp );
- nmap->morez = tmap->morez; // Give it the correct level
- nmap->creator = pc_currchar->name; // Store the creator
- Script *rscript=i_scripts[regions_script]; // Region script
- if (!rscript->Open())
- {
- LogWarning("Treasure hunting cSkills::Decipher : Cannot open regions-script");
- return;
- }
- sprintf(sect, "TREASURE%i", nmap->morez);
- if (!rscript->find(sect))
- {
- rscript->Close();
- LogWarningVar("Treasure hunting cSkills::Decipher : Unable to find 'SECTION TREASURE%X' in regions-script", nmap->morez);
- return;
- }
- rscript->NextLine(); // Get the number of areas
- regtouse = rand()%str2num(script1); // Select a random one
- for (i = 0; i < regtouse; i++) // Skip the ones before the correct one
- {
- rscript->NextLine();
- rscript->NextLine();
- rscript->NextLine();
- rscript->NextLine();
- }
- rscript->NextLine(); // Get the treasure region borders
- btlx = str2num(script1);
- rscript->NextLine();
- btly = str2num(script1);
- rscript->NextLine();
- blrx = str2num(script1);
- rscript->NextLine();
- blry = str2num(script1);
- rscript->Close(); // Close the script
- if ((btlx < 0) || (btly < 0) || (blrx > 0x13FF) || (blry > 0x0FFF)) // Valid region?
- {
- sprintf(sect, "Treasure Hunting cSkills::Decipher : Invalid region borders for lvl.%d , region %d", nmap->morez, regtouse+1); // Give out detailed warning :D
- LogWarning(sect);
- return;
- }
- x = btlx + (rand()%(blrx-btlx)); // Generate treasure location
- y = btly + (rand()%(blry-btly));
- tlx = x - 250; // Generate map borders
- tly = y - 250;
- lrx = x + 250;
- lry = y + 250;
- // Check if we are over the borders and correct errors
- if (tlx < 0) // Too far left?
- {
- lrx -= tlx; // Add the stuff too far left to the right border (tlx is neg. so - and - gets + ;)
- tlx = 0; // Set tlx to correct value
- }
- else if (lrx > 0x13FF) // Too far right?
- {
- tlx -= lrx - 0x13FF; // Subtract what is to much from the left border
- lrx = 0x13FF; // Set lrx to correct value
- }
- if (tly < 0) // Too far top?
- {
- lry -= tly; // Add the stuff too far top to the bottom border (tly is neg. so - and - gets + ;)
- tly = 0; // Set tly to correct value
- }
- else if (lry > 0x0FFF) // Too far bottom?
- {
- tly -= lry - 0x0FFF; // Subtract what is to much from the top border
- lry = 0x0FFF; // Set lry to correct value
- }
- nmap->more1 = tlx>>8; // Store the map extends
- nmap->more2 = tlx%256;
- nmap->more3 = tly>>8;
- nmap->more4 = tly%256;
- nmap->setMoreb1( lrx>>8 );
- nmap->setMoreb2( lrx%256 );
- nmap->setMoreb3( lry>>8 );
- nmap->setMoreb4( lry%256 );
- nmap->morex = x; // Store the treasure's location
- nmap->morey = y;
- Items->DeleItem(tmap); // Delete the tattered map
- }
- else
- sysmessage(s, "You fail to decipher the map"); // Nope :P
- // Set the skill delay, no matter if it was a success or not
- pc_currchar->setSkillDelay( SetTimerSec(pc_currchar->skilldelay, SrvParams->skillDelay()) );
- soundeffect(s, 0x02, 0x49); // Do some inscription sound regardless of success or failure
- sysmessage(s, "You put the deciphered tresure map in your pack"); // YAY
- }
- else
- sysmessage(s, "You must wait to perform another action"); // wait a bit
- */
}
--- 659,662 ----
Index: skills.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/skills.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** skills.h 5 Jul 2003 19:02:13 -0000 1.21
--- skills.h 17 Aug 2003 15:00:15 -0000 1.22
***************
*** 66,79 ****
int GetSubIngotAmt(int p, char id1, char id2, char color1, char color2);
int DeleSubIngot(int p, int id1, int id2, int color1, int color2, int amount);
- void AnvilTarget(int s, int m);
- void AnvilTargetGold(int s, int m);
- void AnvilTargetSilver(int s, int m);
- void AnvilTargetAdam(int s, int m);
- void AnvilTargetMyth(int s, int m);
- void AnvilTargetBronze(int s, int m);
- void AnvilTargetVerite(int s, int m);
- void AnvilTargetMerk(int s, int m);
- void AnvilTargetCop(int s, int m);
- void AnvilTargetAgap(int s, int m);
void Hide( cUOSocket* );
void Stealth( cUOSocket* );
--- 66,69 ----
***************
*** 102,107 ****
void PlayInstrumentPoor(cUOSocket*, P_ITEM pi);
P_ITEM GetInstrument( cUOSocket* );
- void TellScroll(char *menu_name, int player, long item_param);
- void CollectAmmo(int s, int a, int b);
void Meditation(cUOSocket* s);
// skills using crafting menus
--- 92,95 ----
***************
*** 117,138 ****
void SmeltItemTarget(UOXSOCKET s); // Ripper
int TrackingDirection(UOXSOCKET s, P_CHAR pc_i);
- void TinkerAxel(int s);
- void TinkerAwg(int s);
- void TinkerClock(int s);
void Track(P_CHAR pc_i);
- void CookOnFire(int s, short id1, short id2, char* matname);
- void BottleTarget(int s);
void PotionToBottle(P_PLAYER pc, P_ITEM pi_mortar);
- void CreateBandageTarget(int s);
- void HealingSkillTarget(UOXSOCKET s);
void SpiritSpeak(int s);
- void ArmsLoreTarget(int s);
void SkillUse( cUOSocket*, UINT16 );
void CreateTrackingMenu(int s, int m);
void TrackingMenu(int s, int gmindex);
- int Inscribe(int s, long snum);
- int EngraveAction(int s, P_ITEM pi, int cir, int spl);
void Persecute(cUOSocket*);//AntiChrist persecute stuff
- void Decipher(P_ITEM tmap, int s); // By Polygon - attempt to decipher a tattered treasure map
int GetAntiMagicalArmorDefence(P_CHAR pc); // blackwind meditation armor stuff
void Snooping(P_PLAYER, P_ITEM);
--- 105,115 ----
Index: uobject.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/uobject.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -C2 -d -r1.103 -r1.104
*** uobject.cpp 11 Aug 2003 12:17:57 -0000 1.103
--- uobject.cpp 17 Aug 2003 15:00:15 -0000 1.104
***************
*** 753,757 ****
}
! void cUObject::changed( UI32 state )
{
if( state & SAVE ) changed_ = true;
--- 753,757 ----
}
! void cUObject::changed( uint state )
{
if( state & SAVE ) changed_ = true;
Index: uobject.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/uobject.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** uobject.h 11 Aug 2003 03:34:40 -0000 1.67
--- uobject.h 17 Aug 2003 15:00:15 -0000 1.68
***************
*** 85,88 ****
--- 85,89 ----
// Things for building the SQL string
static void buildSqlString( QStringList &fields, QStringList &tables, QStringList &conditions );
+ void changed( uint );
enum eChanged // Each bit controls different state
***************
*** 133,137 ****
virtual ~cUObject() {};
- void changed( UI32 );
void moveTo( const Coord_cl&, bool noRemove = false );
unsigned int dist(cUObject* d) const;
--- 134,137 ----
|