Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex

Members: 0
Guests: 16
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
632
ClarenceKe
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Bug in do_empower
Forum Rules | Mark all | Recent Posts

Bug in do_empower
< Newer Topic :: Older Topic > clans.c

Pages:<< prev 1 next >>
Post is unread #1 Oct 19, 2006, 3:20 pm
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

People with empower are able to empower abilities to others that they themselves do not possess. Example: If I'm empowered with only the "empower", ability, I can empower it to a friend, and he can empower me with all the other commands. There is no check to make sure you HAVE the actual ability you are empowering to the victim.

Fix:

In clans.c

Under do_empower:

Search for:

   if( arg2[0] == '\0' || !str_cmp( arg2, "list" ) )
   {
      ch_printf( ch, "Current bestowed commands on %s: %s.\n\r", victim->name, victim->pcdata->bestowments );
      return;
   }

Directly under that, add:

   if( !is_name( arg2, ch->pcdata->bestowments ))
   {
      send_to_char( "&RI don't think you're even allowed to do that.&W\n\r", ch );
      return;
   }

       
Post is unread #2 Oct 19, 2006, 5:26 pm
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

This doesn't check for leader/first. Update the ifcheck to look like this:


   if( !str_cmp( ch->name, clan->leader ) || !str_cmp( ch->name, clan->number1 ) );
   else if( !is_name( arg2, ch->pcdata->bestowments ))
   {
      send_to_char( "&RI don't think you're even allowed to do that.&W\n\r", ch );
      return;
   }

       
Post is unread #3 Dec 7, 2006, 2:52 am   Last edited Dec 7, 2006, 2:52 am by Banner
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

Samson, that ifcheck for my bugfix to do_empower doesn't work. The purpose of the ifcheck I supplied is so that clan leaders and number1's do not need to have the ability empowered to be able to empower it to another, otherwise, the character needs to have the ability empowered to empower it to another. If you want to do it like the way you posted it, you need to use !str_cmp instead of str_cmp. Hoep that helps, thanks in advance.
       
Pages:<< prev 1 next >>