The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

Fling spell

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    The Dawn Of Time Forum Index » 1.69q fixes already included as part of 1.69r
View previous topic :: View next topic  
Author Message
Kalus



Joined: 03 Oct 2003
Posts: 5

PostPosted: Fri Oct 03, 2003 5:24 pm    Post subject: Fling spell Reply with quote

First, may I say, I LOVE the fling spell. It is original, and fun.

However, I have noticed that it will fling MobProg tokens as well as normal inventory... It took me a bit of time to figure that one out.

I believe I have a fix, but as yet have yet time to test it. I will post it once it is tested and confirmed working.

Kalus


Back to top
View user's profile Send private message Send e-mail
Kalahn
Codebase Developer


Joined: 18 Jan 2003
Posts: 710
Location: New Zealand

PostPosted: Fri Oct 03, 2003 9:53 pm    Post subject: Reply with quote

Nice find, I wrote a fix which is in for the next release.

Code:
SPRESULT spell_fling(int sn,int level,char_data *ch,void *vo,int )
{
   char_data *victim=(char_data*)vo;
   OBJ_DATA *obj, *obj_next;
   int dam, max;
   for (obj = ch->carrying; obj != NULL; obj = obj_next)
   {
      obj_next = obj->next_content;

      if (obj->wear_loc != WEAR_NONE){
         continue;
      }

      // can't fling what you can't see/tokens
      if( !can_see_obj(ch, obj) || obj->item_type == ITEM_TOKEN){
         continue;
      }

      // can't fling nodrop items to get rid of them
      if ( !can_drop_obj( ch, obj ) ){
         act("You can't seem to fling $p, you decide to try something else!",ch,obj,NULL,TO_CHAR);         
         continue;
      }

      // we have something potentially flingable
      break;
   }
   if (obj == NULL)
   {
      ch->println("You must be carrying something to fling.");
      return NO_MANA;
   }
...


- Kal



_________________
Kalahn
Developer of the Dawn of Time Codebase
http://www.dawnoftime.org/
Back to top
View user's profile Send private message Visit poster's website
Kalus



Joined: 03 Oct 2003
Posts: 5

PostPosted: Sat Oct 04, 2003 6:15 pm    Post subject: Thanks. :) Reply with quote

My solution was basically the same thing.. Didn't want to post it untried, though.


Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    The Dawn Of Time Forum Index » 1.69q fixes already included as part of 1.69r All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin