Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Yandex

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
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 >>